Comments (5)
@zeke I do have one! I've been using it at Slack with some success.
- Attach a
blur
event listener on the window. - Open an invisible iframe with the protocol link.
- Wait four seconds.
- Did we lose focus? If so, the app probably launched.
- 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.
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.
Very interesting. How did you arrive at four seconds
?
from fiddle.
@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.
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)
- Environment variables with extra '=' don't work
- I cannot add an icon. HOT 1
- Improve UX Handling if Multiple Main Files
- Error launching app | Electron exited with signal SIGTERM. | Electron exited with code 3489660927. HOT 4
- modules (dependencies) don't work: Error: Cannot find module HOT 5
- Cannot load local file. HOT 1
- `Follow Link` does not work in console or editor
- Handle missing local Electron.app
- Release links broken on electronjs.org HOT 1
- Confusing error if Gist contains invalid `package.json`
- Better UX for expired PAT for Gist publishing HOT 2
- Run from ASAR
- Endless 'Checking Status' Spinner when github release not found
- it does not open HOT 1
- Add the ZIP files to the releases
- cmd+k to clear the console HOT 2
- [Bug]: Electron fiddle downloads are 404ing
- Open/save dialog is not modal HOT 1
- Add support for .mts files in Jest configuration
- Notify new user about the default option : User data directory automatically deleted
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fiddle.