Forked from L422Y/Mass cancel Amazon Subscribe and Save.md
Created
November 7, 2025 00:15
-
-
Save OrderAndCh4oS/9626ef7411df99931c7e0d315295c332 to your computer and use it in GitHub Desktop.
Revisions
-
L422Y revised this gist
Sep 19, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ https://www.amazon.com/auto-deliveries/subscriptionList?shipId=mpkmmwlssrkq&ref_ 2. Paste into devtools console 3. Wait a few moments, and then refresh/repeat for any additional pages 4. Confirm by checking to see if you've received cancellation emails ```js await Promise.all([...document.querySelectorAll('[data-subscription-id]')] -
L422Y renamed this gist
Jul 10, 2024 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
L422Y created this gist
Jul 10, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ 1. Open your subscriptions page: ``` https://www.amazon.com/auto-deliveries/subscriptionList?shipId=mpkmmwlssrkq&ref_=mys_nav_op_D ``` 2. Paste into devtools console 3. Wait a few moments, and then refresh/repeat for any additional pages 4. Confirm by checkout your email inbox for the cancellation emails ```js await Promise.all([...document.querySelectorAll('[data-subscription-id]')] .map(el => el.getAttribute('data-subscription-id')) .map(async (subscriptionId) => { try { const res = await fetch(`https://www.amazon.com/auto-deliveries/ajax/cancelSubscription?deviceType=desktop&deviceContext=web&subscriptionId=${subscriptionId}`) const cancelPanel = await res.text() const div = document.createElement('div') div.innerHTML = cancelPanel document.body.appendChild(div) const form = div.querySelector("form[name='cancelForm']") if (form) { const formData = new FormData(form) const formEntries = Object.fromEntries(formData.entries()) await fetch(form.action, { method: form.method, headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, body: new URLSearchParams(formEntries) }) div.remove() } return 'ok' } catch (reason) { return `error: ${reason}` } }) ) ```