Skip to content

Instantly share code, notes, and snippets.

@smaharj1
Last active November 19, 2023 07:35
Show Gist options
  • Save smaharj1/6d96b368f93c1951ed301cffe87c783e to your computer and use it in GitHub Desktop.
Save smaharj1/6d96b368f93c1951ed301cffe87c783e to your computer and use it in GitHub Desktop.
Chase bank auto apply offers
/**
APPLY CHASE BANK CC OFFERS
This script helps you apply all the Chase bank credit cards automatically.
- Login to Chase and go to https://secure03b.chase.com/web/auth/dashboard#/dashboard/offers/index.
- Open 'Inspect Element'
- Go to Scripts tab and copy this script.
- Run this script.
*/
const BUTTON_CLASSNAME = 'sixersoffers__cta';
const ALREADY_APPLIED_OFFER_CLASSNAME = 'confirmation';
function timeout(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
const getButtons = () => {
const allButtons = document.getElementsByClassName(BUTTON_CLASSNAME);
let validButtons = [];
for (let j=0; j < allButtons.length; j++) {
if (allButtons[j].getElementsByClassName(ALREADY_APPLIED_OFFER_CLASSNAME).length <= 0) {
validButtons.push(allButtons[j])
}
}
return validButtons;
}
const begin = async () => {
let buttons = getButtons();
while (buttons.length > 0) {
let btn = buttons[0];
btn.click();
await timeout(1500);
let close = document.getElementById('flyoutClose');
close.click();
await timeout(1500);
buttons = getButtons();
}
}
begin();
@jowdyboy
Copy link

@nachtien - Chase recently updated their "Offers" page again, so this no longer works as of 11/18/2023.

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