Skip to content

Instantly share code, notes, and snippets.

@MaksimAbramchuk
Created January 19, 2016 17:37
Show Gist options
  • Save MaksimAbramchuk/9c8018507e3e0d1955e3 to your computer and use it in GitHub Desktop.
Save MaksimAbramchuk/9c8018507e3e0d1955e3 to your computer and use it in GitHub Desktop.
getSecureInfo = function (html) {
matches = html.match(/name=”authenticity_token” type=”hidden” value=”(.*)”/);
token = matches[1];
document.getElementById(‘token’).value = token;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment