-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create simple app for simply running "git clone" to local filesystem in chromeos #109
Comments
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) 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) |
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: |
Also keep in mind that chrome apps can create http servers using
|
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?
The text was updated successfully, but these errors were encountered: