Forked from willwm/bookmarklet-youtube-unsubscribe-all.js
Last active
May 24, 2021 04:50
-
-
Save sar/86ebd2e09b99eab63ba5971578357fd5 to your computer and use it in GitHub Desktop.
Unsubscribe from YouTube channels in bulk on target page https://www.youtube.com/feed/channels
This file contains 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 characters
javascript:(() => { | |
const timeout = 500; | |
const buttons = document.querySelectorAll("[aria-label^='Unsubscribe from']"); | |
for(let button of buttons) { | |
setTimeout(() => { | |
console.group(button.attributes['aria-label'].value); | |
setTimeout(() => { button.click(); }, timeout); | |
setTimeout(() => { | |
document.querySelector('#confirm-button').click(); | |
}, timeout); | |
console.groupEnd(); | |
}, timeout); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment