Created
May 30, 2019 17:06
-
-
Save joelhinz/ba46ec2857c03e7903afbdb021536161 to your computer and use it in GitHub Desktop.
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 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