Skip to content

Instantly share code, notes, and snippets.

@mbostock
Created October 22, 2011 00:31
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mbostock/1305347 to your computer and use it in GitHub Desktop.
Autoforking

Paste this into your JavaScript console to fork your own gists! No fork button? No problem!

var f = document.createElement("form");
f.method = "POST";
f.action = "/fork" + location.pathname;
var s = document.createElement("input");
s.setAttribute("name", "authenticity_token");
s.setAttribute("value", document.querySelector("input[name=authenticity_token]").value);
f.appendChild(s);
f.submit();
@dribnet
Copy link

dribnet commented Dec 18, 2012

I believe this no longer works. The gist API also refuses to allow forking your own gists. In what universe does it make sense that everyone else in the world can fork my gist except myself? Sigh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment