Skip to content

Instantly share code, notes, and snippets.

@joelhinz
Created May 30, 2019 17:06
Show Gist options
  • Save joelhinz/ba46ec2857c03e7903afbdb021536161 to your computer and use it in GitHub Desktop.
Save joelhinz/ba46ec2857c03e7903afbdb021536161 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Bet365 reality checker
// @version 0.1
// @namespace joelhinz
// @description Automatically click on "Förbli inloggad"
// @author Joel
// @include https://members.bet365.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
let buttonClicked = false;
let tries = 0;
let tryToClick = () => {
let btn = document.getElementById('stayLoggedInButton');
tries++;
if (btn) {
buttonClicked = true;
btn.click();
} else if (tries < 10) {
setTimeout(tryToClick, 50);
}
}
tryToClick();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment