Skip to content

Instantly share code, notes, and snippets.

@RichardBronosky
Forked from johan/autofork.js
Last active April 15, 2022 03:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RichardBronosky/9db43c0e374933c82401fb2be85494aa to your computer and use it in GitHub Desktop.
Save RichardBronosky/9db43c0e374933c82401fb2be85494aa 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 = location.pathname + "/fork";
f.appendChild(document.querySelector("form[action$=\\/fork] > input[name=authenticity_token]"));
document.body.appendChild(f)
f.submit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment