Created
January 6, 2020 12:12
-
-
Save hadongsoo/d7fbee685710ad060c0dc469d8c22517 to your computer and use it in GitHub Desktop.
gm_fill_form
This file contains 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
// ==UserScript== | |
// @name logon | |
// @namespace https://www.formexample.com | |
// @include https://www.formexample.com | |
// @version 1 | |
// @grant none | |
// @rut-at document-start | |
const TIMEOUT = 2; | |
const NAME = "***"; | |
const PASSWORD = "***"; | |
document.addEventListener("load", function() { | |
setTimeout(function() { | |
document.querySelector("input[name=username]").value = NAME; | |
document.querySelector("input[name=passcode]").value = PASSWORD; | |
document.querySelector("input[name=passcode]").form.submit(); | |
}, TIMEOUT * 1000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment