Skip to content

Instantly share code, notes, and snippets.

View jameswang14's full-sized avatar

James Wang jameswang14

View GitHub Profile
@jameswang14
jameswang14 / chase.js
Last active September 25, 2023 20:25
Redeem all Chase offers
// Go to all offers page
function waitForElm(selector) {
return new Promise(resolve => {
if (document.querySelector(selector))
{
return resolve(document.querySelector(selector));
}
const observer = new MutationObserver(mutations => {
let coupons = Array.from(document.querySelectorAll('button'))
.filter(el => el.textContent === 'Clip')
let lastCount = 0
while (coupons.length > lastCount) {
lastCount = coupons.length
// scroll to bottom and wait for coupons to load
window.scrollTo(0, document.body.scrollHeight);
document.querySelectorAll("[title='Add to Card']").forEach((e, i) => {
setTimeout(() => {e.click()}, i*5000)
})

Keybase proof

I hereby claim:

  • I am jameswang14 on github.
  • I am jameswang (https://keybase.io/jameswang) on keybase.
  • I have a public key whose fingerprint is 6A47 F3C6 82BA 6CFA 5C12 F0A4 1C97 D920 770C 9184

To claim this, I am signing this object: