3

So I saw that when I access a repository on github.com on a windows machine in Firefox or Chrome, it has a button called 'Clone in Desktop', which is a link of this kind:

github-windows://OpenReopo/https://....

Now if I have the github windows client installed on my machine, it opens the link in that client when I confirm it once. I can also see that when github is installed, there is also an entry for a file type called github-windows in my Firefox's Tools->Options->Applications Tab, which is not there on a clean machine Firefox install.

I tried creating a dummy link like myapp://something/... on a webpage, but of course it doesn't work because Firefox does not recognize it as a valid file type (and there's no app registered to use it).

So my question is, how can I achieve what github has done here? I'm ok with writing an installable application (like a C#/C++ program) if I can open links directly in it from Firefox or Chrome.

I tried searching but couldn't find much info about this.

EDIT: I don't think this is a duplicate of Custom protocol handler in chrome , because it talks about navigator.registerProtocolHandler , which is only about web-protocols (for web applications), while what I want here is to open the link in a desktop application.

Thanks!

Community
  • 1
  • 1
Piyush Soni
  • 1,356
  • 3
  • 17
  • 40
  • navigator.registerProtocolHandler – dandavis Feb 26 '15 at 18:41
  • @Daniel A. White: I don't think this is the duplicate of the link you've added. That link talks about Web Protocol handlers - to be opened in web applications (including the use of navigate.registerProtocolHandler), while this one is to open the links in a desktop installed application. – Piyush Soni Feb 26 '15 at 18:49
  • @dandavis: I edited my question. I need a solution for desktop apps, not web protocol handlers. – Piyush Soni Feb 26 '15 at 18:53
  • i misunderstood you, sorry. your answer is still in the duplicate-linked post, the one that details the registry entries needed to define a handler in windows itself. any windows application development language has registry features. You can even make a static .reg file that will open it up for someone who's not installing any actual software. – dandavis Feb 26 '15 at 19:08
  • Yeah, not a problem. The question there specifically talks about sending the link to a web-app, while mine is about desktop apps. The registry answer mentioned there is not accepted there, so I don't know if it works. I just don't want this question to be closed as a duplicate of a wrong question and don't know how to contact the moderator who closed this question a little too fast. – Piyush Soni Feb 26 '15 at 19:27
  • none of the answers are accepted. and the one with the votes is the one most here will assume that's your asking, as they did to close. but there's nothing wrong with the other answer in the linked question and it's exactly what you need... yes, it was flagged too soon, but by coincidence, the dupe happens to have your exact answer, so no loss. – dandavis Feb 26 '15 at 20:36

0 Answers0