Skip to content

Instantly share code, notes, and snippets.

@mahemoff
Created August 19, 2009 16:57
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 mahemoff/170459 to your computer and use it in GitHub Desktop.
Save mahemoff/170459 to your computer and use it in GitHub Desktop.
netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');
$.get("http://twitter.com",
function(response) {
var token= response.match(/authenticity_token.*?value="(.*?)"/)[1]
netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');
$.post("http://twitter.com/sessions", {
"session[authenticity_token]": token,
"session[username_or_email]": $("#username").val(),
"session[password]": $("#password").val()
}, function(html) {
console.log("twitter homepage", html);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment