Created
April 22, 2014 22:23
-
-
Save sergiopereiraTT/11196486 to your computer and use it in GitHub Desktop.
Bookmarklet for quick login
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var d=document;s=d.querySelector;s.call(d,'input[name*=email]').value='[email protected]'; s.call(d,'input[name*=pass]').value='SECRETPASSWORDHERE';s.call(d,'button[id*=login],input[type=button][id*=login],.btn-login').click(); }()) |
This is great!
Another way to do this would be to create a function 'doit()' in a general js import and call this from the bookmark like:
<a href="javascript:doit();">doit</a>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a bookmarklet. To use it, add a bookmark in your browser and use the above text as the URL.
This bookmarklet will fill email+password login forms and submit them. You'll have to update it with the desired email and password and it's obviously not a good idea to use it with real-world credentials. Use it just for testing, with test accounts.
It won't work for every imaginable login form since it was mainly created for the projects I work on, which are consistent about the form field names.