🏠 Home 

Unsub From All emails

Adds a small button to unsubscribe from all the useless and pesky emails feeds from Amazon.


Installer dette script?
  1. // ==UserScript==
  2. // @name Unsub From All emails
  3. // @description Adds a small button to unsubscribe from all the useless and pesky emails feeds from Amazon.
  4. // @namespace Mattwmaster58
  5. // @match https://*.amazon.com/preferences/subscriptions/your-subscriptions/current-subscriptions*
  6. // @grant none
  7. // @version 0.0.1.20180502004111
  8. // ==/UserScript==
  9. function unsubAll(){
  10. for (let i = 0; i < document.getElementsByClassName('a-switch-input').length; i++) {
  11. if (document.getElementsByClassName('a-switch-input')[i].checked) {
  12. document.getElementsByClassName('a-switch')[i].click();
  13. }
  14. }}
  15. document.getElementsByClassName('a-spacing-medium')[0].outerHTML += '<input id="unsub-all" type="button" value="Unsubscribe from all"/>'
  16. document.getElementById('unsub-all').addEventListener('click', function(){unsubAll()});