Skip to content

Instantly share code, notes, and snippets.

@dploeger
Last active June 16, 2020 09:45
Show Gist options
  • Save dploeger/5f51c3ea9046a35f386d6bf376fbfa83 to your computer and use it in GitHub Desktop.
Save dploeger/5f51c3ea9046a35f386d6bf376fbfa83 to your computer and use it in GitHub Desktop.
Tampermonkey script to automatically login into graylog
// ==UserScript==
// @name Graylog login
// @namespace https://kps.com/
// @version 0.1
// @description Automatically logs in into Graylog
// @author Dennis Ploeger <dennis.ploeger@kps.com>
// @grant none
// @downloadUrl https://gist.github.com/dploeger/5f51c3ea9046a35f386d6bf376fbfa83/raw
// @uploadUrl https://gist.github.com/dploeger/5f51c3ea9046a35f386d6bf376fbfa83/raw
// ==/UserScript==
(function() {
'use strict';
const checkLogin = () => {
if (document.querySelector('#username')) {
document.querySelector('button').click()
}
window.setTimeout(checkLogin, 5000)
}
window.setTimeout(checkLogin, 5000)
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment