Skip to content

Instantly share code, notes, and snippets.

@warrenseine
Last active August 20, 2022 08:47
Show Gist options
  • Save warrenseine/95a629913e64b8d6658522e362fed5f8 to your computer and use it in GitHub Desktop.
Save warrenseine/95a629913e64b8d6658522e362fed5f8 to your computer and use it in GitHub Desktop.
Tampermonkey OneLogin Auto-Login
// ==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