Created
January 27, 2024 18:34
-
-
Save Duologic/f09027da253c6efd3e09a8580e9aa588 to your computer and use it in GitHub Desktop.
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 Hit sign-in button on Drone | |
// @description Hit sign-in button on Drone | |
// @version 1.0 | |
// @namespace https://drone.grafana.net | |
// @match https://drone.grafana.net/* | |
// @run-at document-start | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var waitForThatFrickingButton1 = setInterval(function() { | |
let xpath = "//span[text()='Sign In']"; | |
let button = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
if(button) { | |
button.click(); | |
clearInterval(waitForThatFrickingButton1); | |
} | |
}, 500) | |
var waitForThatFrickingButton2 = setInterval(function() { | |
let xpath = "//span[text()='Continue']"; | |
let button = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
if(button) { | |
button.click(); | |
clearInterval(waitForThatFrickingButton2); | |
} | |
}, 500) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment