You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
create simple app for simply running "git clone" to local filesystem in chromeos #109
If I click on an anchor with such a url (git: uri scheme) it would be really great if there were a chrome app that would then pop up and ask me where I want to clone it to. The end result should be a local directory is populated with the project in the exact same fashion as if you were to run "git clone" in the terminal. It seems like it would be a great use of this library. Do you think it would be fairly easy to implement?
What a great idea! Can a chrome app register an url handler and do arbitrary action based on it? I thought the protocol handlers could only return a url.
As far as cloning, most the needed code is there already.
There's a slightly less than ideal way to register protocol handlers. You need to do it on a website. There's no way yet for an app to register the protocol handler for itself (though I can see this coming in a future chrome version)
Also keep in mind that chrome apps can create http servers using
chrome.sockets and a lot of js.
On Oct 31, 2014 7:34 PM, "Kyle Graehl" [email protected] wrote:
Activity
creationix commentedon Oct 31, 2014
What a great idea! Can a chrome app register an url handler and do arbitrary action based on it? I thought the protocol handlers could only return a url.
As far as cloning, most the needed code is there already.
kzahel commentedon Oct 31, 2014
There's a slightly less than ideal way to register protocol handlers. You need to do it on a website. There's no way yet for an app to register the protocol handler for itself (though I can see this coming in a future chrome version)
https://github.com/JSTorrent/jstorrent.github.io/blob/master/js/index.js#L29
But when the app is installed, it could give a notification with instructions for how to install it. (like https://plus.google.com/105605890151842939367/posts/VDaYzQoFDRW)
Once navigator.registerProtocolHandler has the url, you can use chrome.runtime.sendMessage to give the URL to the app (https://github.com/JSTorrent/jstorrent.github.io/blob/master/share/share.js#L129)
kzahel commentedon Nov 1, 2014
Hmm after doing a little searching I found out there may be a small improvement to be made in this process. Instead of using chrome.runtime.sendMessage it looks like this can bypass that step:
https://developer.chrome.com/apps/manifest/url_handlers
creationix commentedon Nov 1, 2014
Also keep in mind that chrome apps can create http servers using
chrome.sockets and a lot of js.
On Oct 31, 2014 7:34 PM, "Kyle Graehl" [email protected] wrote: