Last active
June 16, 2020 09:41
-
-
Save dploeger/30d5c0e3bed70b1fbb06a45a6d7a6ced to your computer and use it in GitHub Desktop.
Tampermonkey script to automatically login into Foreman
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
// ==UserScript== | |
// @name Foreman Autologin | |
// @namespace https://kps.com/ | |
// @version 0.2 | |
// @description Automatically login into Foreman | |
// @author Dennis Ploeger <[email protected]> | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js | |
// @grant none | |
// @downloadUrl https://gist.github.com/dploeger/30d5c0e3bed70b1fbb06a45a6d7a6ced/raw | |
// @updateUrl https://gist.github.com/dploeger/30d5c0e3bed70b1fbb06a45a6d7a6ced/raw | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const login = () => { | |
if ($('#login_login').length == 0) { | |
window.setTimeout(login,1000) | |
return | |
} | |
$('form').submit() | |
} | |
window.setTimeout(login, 1000) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment