Last active
July 23, 2021 22:29
-
-
Save Serrin/7becc3b0189381e2e214c80d5c2f6bad to your computer and use it in GitHub Desktop.
Youtube hide videos from the subscriptions page (https://www.youtube.com/feed/subscriptions)
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
[...document.querySelectorAll(".style-scope .ytd-menu-renderer")] | |
.filter((v) => v.className === "style-scope ytd-menu-renderer") | |
//.slice(0,50) // change here to hide more videos or comment this line to hide all | |
.forEach( (v,i,a) => { | |
console.log((i + 1) + " / " + a.length); | |
v.click(); | |
//[...document.querySelectorAll(".style-scope .ytd-menu-service-item-renderer")] | |
//.filter( (v) => v.innerHTML === "Hide" ) | |
// //.forEach((v)=>v.click()); | |
//.at(-1).click(); | |
[...document.getElementsByClassName("ytd-menu-service-item-renderer")] | |
.find( (v) => v.innerHTML === "Hide" ) | |
.click(); | |
}); | |
document.querySelectorAll('[is-dismissed=""]') | |
.forEach( (v,i,a) => v.remove() ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment