🔥

// CVS coupon clipper
// https://www.cvs.com/extracare/home/
(function run() {
    const coupons = Array.from(document.querySelectorAll('send-to-card-action'))
        .map(e => e.querySelector('.coupon-container .coupon-action.sc-send-to-card-action'))
        .filter(Boolean);
 
    const totalCoupons = coupons.length;
    console.log(`🛍️ Total coupons to add: ${totalCoupons}`);
 
    coupons.forEach((e, index) => {
        setTimeout(() => {
            e.click();
            const couponsLeft = totalCoupons - index - 1;
            console.log(`✨ Coupon added... ${couponsLeft} more left! ✨`);
            if (couponsLeft === 0) {
                console.log("🎉 All coupons have been added to your card. Enjoy your savings! 🎉");
            }
        }, index * 350);
    });
 
    if (totalCoupons === 0) {
        console.log("🎉 All coupons have been added to your card. Enjoy your savings! 🎉");
    }
})();