How can I Make Use of Custom Scheme for URI Links?

moritz_david June 10, 2014

I am very impressed by Sourcetree's ability to seemingly create its own custom URI scheme of "sourcetree://clonerepo..." and I was wondering if there was a way for me to make use of that feature in my own applications.

I recreated the link in both Firefox and Chrome and realized that there was no javascript used to cause a local instance of Sourcetree to open. However, when I tried to make my own scheme, it, naturally, was unrecognized. This led me to believe that during the installation of Sourcetree, there must have been some method that added the "sourcetree://" scheme to a whitelist of sorts in Chrome and Firefox to allow it to function as it does.

If anyone could point me in the right direction on this, I will be very grateful!

Thanks!

1 answer

1 accepted

2 votes
Answer accepted
Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 11, 2014

By right, one would be creating a custom uri for an application (http://msdn.microsoft.com/en-us/library/ie/aa767914(v=vs.85).aspx) as defined here. As long as the client has this in it's registry (e.g. HKEY_CLASSES_ROOT\sourcetree\shell\open\command), the client machine should recognize "sourcetree://".

Not sure what you are trying to do.

moritz_david June 11, 2014

This is perfect! Thank you very much! It was very rewarding to be able to create my own scheme.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events