-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathl
1 lines (1 loc) · 845 Bytes
/
l
1
!function(){function e(e){return new Promise(t=>setTimeout(t,e))}let t=!1;setInterval(()=>{t?clearInterval():(console.log("calling"),function i(){let n=document.getElementsByTagName("ytm-player-error-message-renderer");if(n.length&&n[0].firstChild.innerText.trim().includes("This video is unavailable")){t=!0,console.log(JSON.stringify({data:"REMOVED"})),Like.postMessage(JSON.stringify({data:"REMOVED"}));return}var a=document.getElementsByTagName("button");for(let r=5;r<a.length;r++){if(a[r].getAttribute("aria-label").includes("likes")){t=!0,Like.postMessage(JSON.stringify({data:"Already"}));return}if(a[r].getAttribute("aria-label").includes("like this")){a[r].click(),t=!0,e(500).then(()=>{window.find("Sign in to ")?Like.postMessage(JSON.stringify({data:"SIGNIN"})):Like.postMessage(JSON.stringify({data:"DONE"}))});return}}}())},0)}();