Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 862 Bytes

README.md

File metadata and controls

37 lines (26 loc) · 862 Bytes

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.)