/Bjs-Wholesale-Coupon-Bot

Add coupons automatically to your BJ's Wholesale Club account without clicking or tapping a thousand times.

Bjs-Wholesale-Coupon-Bot

Instructions

function sleep(t) {  
  const start = Date.now();
  while (Date.now() - start < t);
}

var interval = setInterval(function(){
	const buttons = document.getElementsByName('clipToCard');

			
	buttons.forEach(btn => {
		console.log("Clicking: " + buttons.length + " ", btn);
		btn.click();
		btn.scrollIntoView({behavior:"smooth"});
		buttons[btn].remove();
		sleep(3000);
	});

    if (buttons.length === 0) {
        console.log("Done");
        clearInterval(interval);
    }
		
}, 3000);
    

You may need to run this more than once (press the up arrow in the console, and Enter again.)