Skip to content

Instantly share code, notes, and snippets.

@nathanmarcos
Last active April 24, 2023 06:51
Show Gist options
  • Select an option

  • Save nathanmarcos/393f4d770628d279fe37ce78e3aa9e29 to your computer and use it in GitHub Desktop.

Select an option

Save nathanmarcos/393f4d770628d279fe37ce78e3aa9e29 to your computer and use it in GitHub Desktop.
Click to continue button on single sign-on page on github
// ==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