2

Github has a 'Clone in Mac' button for repos:

Does anyone know any bookmarklet or Chrome Extension to be able to do the same for gists?

2 Answers 2

1

The URL of the button is:

github-mac://openRepo/https://github.com/user/repo

Since Gists are repositories too, the URL for Gists would be:

github-mac://openRepo/https://gist.github.com/123456

Thus, your Javascript code is:

window.location = "github-mac://openRepo/" + document.location.href

And your bookmarklet code:

javascript:(function(){window.location=%22github-mac://openRepo/%22+document.location.href})();

To create this bookmarklet, simply go to Bookmarks Manager (or ⌥⌘B), and add your link:

This will now work for all Git repositories, even the normal ones.

1
  • See my answer I made a userscript for this with your instructions. Works like a charm. I've validated your answer.
    – abernier
    Aug 1, 2012 at 14:21
1

I made a userscript to automatically add 'Clone in Mac' button on gists.

enter image description here

https://gist.github.com/3227047

And of course, you can clone it in Mac :p

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .