Skip to content

Instantly share code, notes, and snippets.

@johan
Forked from mbostock/autofork.js
Created October 22, 2011 16:05
Show Gist options
  • Save johan/1306143 to your computer and use it in GitHub Desktop.
Save johan/1306143 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;
f.appendChild(document.querySelector("input[name=authenticity_token]"));
f.submit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment