Created
February 14, 2017 20:20
-
-
Save Petezah/bedaf96d3b890f63102b4a6003abd877 to your computer and use it in GitHub Desktop.
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
var somethingIStillWantToWatch = "PhysicalGraph"; | |
var somethingElseIStillWantToWatch = "Petezah"; | |
var li = document.getElementsByTagName("li"); | |
for(var i=0; i<li.length; ++i){ | |
var l = li[i]; | |
var la = l.getElementsByTagName("a"); | |
var lbtn = l.getElementsByTagName("button"); | |
if (la && la[0] && la[0].href && la[0].href.indexOf(somethingIStillWantToWatch) < 0 && la[0].href.indexOf(somethingElseIStillWantToWatch) < 0){ | |
if (lbtn && lbtn[0] && lbtn[0].textContent.indexOf("Unwatch") >= 0){ | |
console.log("Unwatching " + la[0].href); | |
lbtn[0].click(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment