Skip to content

Instantly share code, notes, and snippets.

@elado
Last active May 2, 2025 13:37
Show Gist options
  • Save elado/69fa611d84305dea4b38801880743928 to your computer and use it in GitHub Desktop.
Save elado/69fa611d84305dea4b38801880743928 to your computer and use it in GitHub Desktop.
American Express - Add all offers to card at once (bookmarklet)

American Express - Add all offers to card at once

If you own an AMEX card, you can add a bunch of offers to the card in this link: https://global.americanexpress.com/offers/eligible

There are many offers, and they change all the time. Instead of clicking "Add to card" repeatedly, I created this bookmarklet.

In Chrome, add a new bookmark (right click on bookmarks bar -> "Add Page...") with the following URL:

javascript:btns=[...document.querySelectorAll('.offer-cta')].filter(b => b.textContent === 'Add to Card');c=()=>{ b = btns.shift(); if (!b) return; b.click(); setTimeout(c, Math.random() * 300) };c();

Just visit that bookmark while on the offers page, and watch the magic happens!

javascript:btns=[...document.querySelectorAll('.offer-cta')].filter(b => b.textContent === 'Add to Card');c=()=>{ b = btns.shift(); if (!b) return; b.click(); setTimeout(c, Math.random() * 300) };c();
@batinthestacks
Copy link

batinthestacks commented Feb 18, 2024

The following modified version worked for me. Note I increased the minimum timeout to .8 seconds and log each clicked offer.

javascript:btns=Array.from(document.querySelectorAll("button[title='Add to Card']")),(c=()=>{if(!(b=btns.pop()))return console.log("added all!");b.click(),console.log("clicked:"+b.getAttribute("aria-label")),setTimeout(c,1500*Math.random()+800)})();

Here it is not minified
btns=Array.from(document.querySelectorAll("button[title='Add to Card']"));
c=()=>{ b = btns.pop();
if (!b) return console.log("added all!");
b.click();
console.log("clicked:"+b.getAttribute("aria-label"));
setTimeout(c, Math.random() * 1500 + 800) };
c();

@eprench
Copy link

eprench commented May 2, 2025

Worked great for me! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment