Skip to content

Instantly share code, notes, and snippets.

@drewkiimon
Last active September 15, 2023 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drewkiimon/d1cbfb511c0263721bed6313b9051917 to your computer and use it in GitHub Desktop.
Save drewkiimon/d1cbfb511c0263721bed6313b9051917 to your computer and use it in GitHub Desktop.
Accept all Amex Offers
/*
* 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