Joined Sep 2021
L2: Beginner
May 28, 2024 at
11:31 AM
Get Amazon coupons
Coupons
Like many of you, I take advantage of the Amazon S&S discounts for various products to save money... But I don't really want the item at full price the next subscription interval.
Javascript Bookmarklet to move every single subscribe and save item to 6 months in the future
This is super simple and very useful for myself.
How to create the bookmarklet (CHROME)
Mass Cancel script:
What does this script do?
Javascript Bookmarklet to move every single subscribe and save item to 6 months in the future
This is super simple and very useful for myself.
- Visit this URL: https://www.amazon.com/auto-deliv...ret_act
ive - Press Bulk Edit Schedule At the top
- Click on the bookmarket that you created (steps below)
How to create the bookmarklet (CHROME)
- Right click on your bookmark bar and press "add page..."
- Name the bookmark whatever you'd like (I called it S&S Mover')
- Paste the following code into the URL bar (then press save)
Code:
javascript:(function(){let clickMoreSubscriptions=()=>{let e=document.querySelector('.a-section.subscription-pagination-trigger-container span[data-action="bulk-edit-pagination-action"] > .subscription-pagination-trigger');if(!e||e.parentElement.classList.contains('aok-hidden')){console.log('No more subscriptions to show or button is hidden.'),selects=[...document.querySelectorAll('select[name="changeNextDeliveryDate"]')],console.log(`Found ${selects.length} select elements.`),processNextSelect();return}e.click(),console.log('Clicked "Show more subscriptions" button.'),clickMoreSubscriptions.counter===undefined?clickMoreSubscriptions.counter=1:clickMoreSubscriptions.counter++,clickMoreSubscriptions.counter<=50?setTimeout(clickMoreSubscriptions,1e3):console.log(%27Stopped after 50 clicks.%27)};let selects=undefined;let processNextSelect=()=>{if(0===selects.length)return console.log(%27All select boxes processed!%27);let e=selects.shift(),t=e.options,n=t[t.length-1],s=e.value;if(s===n.value)return console.log(%27already set, skipping subscription%27),void setTimeout(processNextSelect,100);console.log(%27Changing select element:%27,e),console.log(`Current value: ${s}, New value: ${n.value}`),e.value=n.value;let o=new Event(%27change%27,{bubbles:!0});e.dispatchEvent(o);let r=e.closest(%27form%27).querySelector(%27.a-button-input%27);r&&r.click(),setTimeout(processNextSelect,100)};clickMoreSubscriptions()})();
Code:
javascript:(function(){let baseUrl="https://www.amazon.com/auto-deliveries/ajax/cancelSubscriptionAction?actionType=cancelSubscription&canceledNextDeliveryDate=1730880000000&subscriptionId=";let spans=document.querySelectorAll(%27span[data-action="edit-link-subscription-tablet"]%27);let subscriptionIds=[...spans].map(span=>{let data=span.getAttribute(%27data-edit-link-subscription-tablet%27);let match=data.match(/subscriptionId=([^&"]+)/);return match?match[1]:null;}).filter(id=>id);console.log(`Found ${subscriptionIds.length} subscription IDs.`);function openNextUrl(index){if(index>=subscriptionIds.length){console.log(%27All URLs have been opened.%27);return;}let id=subscriptionIds[index];let url=baseUrl+id;console.log(`Opening URL: ${url}`);let newWindow=window.open(url,%27_blank%27);setTimeout(()=>{openNextUrl(index+1);},1000);}openNextUrl(0);})();
- Auto expands the page so all your items show up ("Show more subscriptions" )
- Finds all the items on the page that have a drop down date, and selects the last option (6 months away)
- Auto-Clicks the "Apply" button for you
![Smilie Smilie](https://static.slickdealscdn.com/images/slickdeals/blank.gif)
About the OP
Don't have Amazon Prime? Students can get a free 6-Month Amazon Prime trial with free 2-day shipping, unlimited video streaming & more.
If you're not a student, there's also a free 1-Month Amazon Prime trial available.
You can also earn cash back rewards on Amazon and Whole Foods purchases with the Amazon Prime Visa credit card. Read our review to see if it’s the right card for you.
8 Comments
Your comment cannot be blank.
Sign up for a Slickdeals account to remove this ad.
By using the script, you just move all the stuff ordered in the past to the back of the line. Once you forget to use the script (getting sick, being busy, traveling, etc.) you'll be hit with a mountain of unexpected, unneeded, and expensive crap.
There was a thread not so long ago by an unlucky fella who couldn't cancel S&S when his account was frozen by Amazon...
Sign up for a Slickdeals account to remove this ad.