This is a bookmarklet that adds a fully functional Fork button to your own Gist.
If a Fork button is already present in the page, this bookmarklet will set focus to it instead of adding another one.
The change is temporary and the button will disappear as soon as you navigate away from that Gist (clicking the Fork button does this for you as well).
A Closure Compiler optimized version provided below for convenient copy'n'paste.
This no longer works because the fork link has been replaced with a form that includes a
authenticity_token
field. I don't think there is any way around that from the browser.I now use https://github.com/defunkt/gist from the CLI to:
credential-helper
)original_url="git@gist.github.com:7085254.git"
url="$(date | gist -f temp)"
git clone $url; cd $(basename $url)
git remote add alt $original_url; git fetch alt
git reset --hard alt/master
git push -f origin master
Note: the
#
are in there so you can copy-pasta the whole block into the terminal 😉