Created
July 11, 2018 08:13
-
-
Save volkanbicer/a8b2411c92b0d9cdeff0350d901b466a to your computer and use it in GitHub Desktop.
ITunes charts customizer.
This file contains 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
function removeByCategory(category){ | |
let allLinks = document.getElementsByTagName('a') | |
let links = [] | |
for(let i = 0; i<allLinks.length; i++){ | |
if(allLinks[i].text === category){ | |
links.push(allLinks[i]) | |
} | |
} | |
console.log(links.length, 'Removed') | |
for(let i = 0; i<links.length; i++){ | |
let link = links[i] | |
link.parentNode.parentNode.remove() | |
} | |
} | |
/* | |
Usage | |
removeByCategory('Games') | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment