Last active
April 24, 2023 06:51
-
-
Save nathanmarcos/393f4d770628d279fe37ce78e3aa9e29 to your computer and use it in GitHub Desktop.
Click to continue button on single sign-on page on github
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 Single sign-on to trivago N.V. on GitHub | |
| // @namespace http://nathanmarcos.com | |
| // @version 0.1 | |
| // @description Click to continue button on single sign-on page on github | |
| // @author Nathan Marcos | |
| // @match https://github.com/trivago/* | |
| // ==/UserScript== | |
| (function () { | |
| "use strict"; | |
| const findElement = (selector, text) => { | |
| const elements = document.querySelectorAll(selector); | |
| return Array.prototype.filter.call(elements, (element) => { | |
| return RegExp(text).test(element.textContent); | |
| }); | |
| }; | |
| const continueButton = findElement("button", "Continue")[0]; | |
| if (continueButton) { | |
| continueButton.click(); | |
| } | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment