-
-
Save Frankenmint/715e52a956cbe03a9fa6717e8439a0c0 to your computer and use it in GitHub Desktop.
auto-login bookmarklet
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
// Saved URL should look like this: | |
// javascript:<function> | |
// replace <function> with the following text | |
(function(){ | |
// Grab the username and password input fields | |
user = document.getElementById('txtUserName'); | |
pass = document.getElementById('txtPassword'); | |
// Grab the submit button, oddly named 'punch' | |
punch = document.getElementById('btnPunch'); | |
// Assign them values and simulate clicking the 'punch' button | |
user.value = 'foo'; | |
pass.value = 'bar'; | |
punch.click() | |
// Wrap it up in parens so it is a self-calling function | |
})(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment