Last active
September 15, 2023 16:29
-
-
Save drewkiimon/d1cbfb511c0263721bed6313b9051917 to your computer and use it in GitHub Desktop.
Accept all Amex Offers
This file contains 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
/* | |
* 1. Go to https://global.americanexpress.com/offers/eligible | |
* 2. Open up console | |
* 3. Paste this script in and click "Enter" | |
*/ | |
(() => { | |
const nodes = Array.from(document.querySelectorAll(".offer-cta")).filter((n) => n.innerText === "Add to Card") | |
const nodeCount = nodes.length; | |
const SECONDS = 1000; | |
let i = 0; | |
const interval = setInterval(() => { | |
if (i === nodeCount) { | |
console.log("All offers added!") | |
return clearInterval(interval); | |
} | |
console.log(`Amex offer ${i + 1} / ${nodeCount}`) | |
const node = nodes[i]; | |
node.click(); | |
i++; | |
}, SECONDS) | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment