Back Original

Credit Card Scripts

Modern credit cards offer lots of deals, but you have to opt-in to them. I have credit cards from the following two banks. For each, if you go to the page, open the developer console (cmd + opt + j on OSX + Chrome), and then paste the script and press enter, it will iterate over the activate buttons and click them.

Wait until the spinners finish on the page, then refresh and try again until no unactivated offers are on the page. Repeat monthly.

I do love it when #programming can save you money.

American Express

https://global.americanexpress.com/offers

document.querySelectorAll('[data-testid="merchantOfferListAddButton"]').forEach((e) => e.click())

Wells Fargo

https://web.secure.wellsfargo.com/auth/deals-portal

const closeSel = 'button[class*="Header__close"]';
const wait = async pred => { for (let i = 0; i < 30 && !pred(); i++) await new Promise(r => setTimeout(r, 100)); };

for (const b of document.querySelectorAll('[data-testid="deal-status-indicator"]')) {
  b.click();
  await wait(() => document.querySelector(closeSel));
  document.querySelector(closeSel)?.click();
  await wait(() => !document.querySelector(closeSel));
}

Inspired by reddit.

Hope you found these useful.

/Nat