Created
October 6, 2023 03:33
-
-
Save thefloodshark/48bfa1c9fbc7c8ff00ef6ad84b0848ad to your computer and use it in GitHub Desktop.
American Express Promo Accepter (Tampermonkey)
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 Amex Promo Offers Accepter | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @description Clicks on elements with class "offer-cta" one at a time with a delay | |
// @match https://global.americanexpress.com/offers/eligible | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
setTimeout(function() { | |
const elements = document.querySelectorAll('.css-1mz64tl'); | |
let index = 0; | |
function clickNextElement() { | |
if (index < elements.length) { | |
elements[index].click(); | |
index++; | |
setTimeout(clickNextElement, 2000); // Delay of 1 second (1000 milliseconds) | |
} | |
} | |
clickNextElement(); | |
}, 2000); // Delay of 1 second (1000 milliseconds) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment