Last active
March 25, 2024 03:11
-
-
Save willwm/c9b07cc927b10fedabe2d329ea9c36e6 to your computer and use it in GitHub Desktop.
Bookmarklet: Unsubscribe from YouTube channels in bulk
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 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
Related Links
YouTube Data API v3