Skip to content

Instantly share code, notes, and snippets.

@dploeger
Last active June 16, 2020 09:50
Show Gist options
  • Save dploeger/c30aeeaf1fa5fe8f2a5b2b3b6a58abec to your computer and use it in GitHub Desktop.
Save dploeger/c30aeeaf1fa5fe8f2a5b2b3b6a58abec to your computer and use it in GitHub Desktop.
Tampermonkey script to automatically login into Elastic HQ
// ==UserScript==
// @name Autologin ElasticHQ
// @namespace https://kps.com/
// @version 0.3
// @description Login into ElasticHQ
// @author Dennis Ploeger <dennis.ploeger@kps.com>
// @grant none
// @downloadUrl https://gist.github.com/dploeger/c30aeeaf1fa5fe8f2a5b2b3b6a58abec/raw
// @updateUrl https://gist.github.com/dploeger/c30aeeaf1fa5fe8f2a5b2b3b6a58abec/raw
// ==/UserScript==
(function() {
'use strict';
const hitSubmit = () => {
if (document.querySelector('form[name="homeCtrl.form"]')) {
document.querySelector('form[name="homeCtrl.form"] button').click()
}
window.setTimeout(hitSubmit, 1000)
}
window.setTimeout(hitSubmit, 1000)
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment