Giter Club home page Giter Club logo

Comments (5)

felixrieseberg avatar felixrieseberg commented on May 18, 2024 6

@zeke I do have one! I've been using it at Slack with some success.

  1. Attach a blur event listener on the window.
  2. Open an invisible iframe with the protocol link.
  3. Wait four seconds.
  4. Did we lose focus? If so, the app probably launched.
  5. If not, we're probably still in the browser and nothing happened since the app isn't installed.

Works like a breeze. Might feel a bit dirty but that's sort of the best we have today.

from fiddle.

zeke avatar zeke commented on May 18, 2024

fancy techniques we know to detect if fiddle is running and launch it

The only one I've ever been able to think of is having fiddle run a server on localhost and trying to ping it from the website. What are some other techniques?

from fiddle.

zeke avatar zeke commented on May 18, 2024

Very interesting. How did you arrive at four seconds?

from fiddle.

felixrieseberg avatar felixrieseberg commented on May 18, 2024

@zeke It's pretty much an arbitrary number – pick whatever you think is enough to ensure that most machines had enough time to open the target app and that the app managed to steal focus.

from fiddle.

 avatar commented on May 18, 2024

We have a protocol handler, it would be good to make a https://fiddle.electronjs.org/launch/{gist_id} endpoint that will use any of the fancy techniques we know to detect if fiddle is running and launch it, if it isn't running we can give them a fancy download page with an explanation / overview of what fiddle is.

I can build that page itself and the logic but would need some help making it look nice on the website side of things +1

Webpages CAN open protocols directly without iframes. That means that once the protocol has ended the connection, itll close the tab

from fiddle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.