-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.js
27 lines (24 loc) · 830 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//ALL THIS BECAUSE YOU SUCK AT MAKING
//SIMPLE FEATURES PEOPLE ACTUALLY WANT?!
let timer = 500; //Number of milliseconds
function delete_one(){
document.querySelector("ytd-playlist-video-renderer").querySelector("button").click();
setTimeout(()=>{
var options = document.querySelectorAll("paper-listbox")[1].querySelectorAll("ytd-menu-service-item-renderer");
if (options.length == 1){
options[0].click(); //If the video was removed from YT
} else {
options[2].click(); //If it's still there, the option
//to remove it is the third (unless they change it
//again to piss off their userbase further)
}
}, timer);
}
function main(){
setInterval(()=>{
delete_one();
}, (timer * 2)); //Twice the timeout used internally
//to avoid conflicts
//If your machine is too slow, adjust it higher
}
main();