Last active
August 20, 2022 08:47
-
-
Save warrenseine/95a629913e64b8d6658522e362fed5f8 to your computer and use it in GitHub Desktop.
Tampermonkey OneLogin Auto-Login
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 OneLogin Auto-Login | |
// @namespace http://tampermonkey.net/ | |
// @match https://*.onelogin.com/login2/* | |
// @version 1.0 | |
// @author Warren Seine | |
// @description Auto-login on OneLogin if password is auto-filled | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=onelogin.com | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
let interval = setInterval(function() { | |
const password = document.getElementById("password"); | |
const button = document.querySelector("button[type='submit']"); | |
if (!password || !button) return; | |
if (password.value) { | |
clearInterval(interval); | |
button.click(); | |
} | |
}, 200); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment