Last active
June 4, 2020 08:06
-
-
Save AstroCB/c5ca819db4e0f606cb02 to your computer and use it in GitHub Desktop.
Clean up YourListen podcast service
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
// ==UserScript== | |
// @name Clean Up YourListen | |
// @namespace http://greasyfork.org/ | |
// @include http://yourlisten.com/* | |
// @description Remove YourListen cruft | |
// ==/UserScript== | |
window.addEventListener("load", function () { | |
var classes = ["a_tabs", "ad-trackeable", "fbLeft", "navbar-inner", "ad-pad-sm"]; | |
var ids = ["social", "audio_sdb", "f"]; | |
for (var i = 0; i < classes.length; i++) { | |
document.getElementsByClassName(classes[i])[0].remove(); | |
if (classes[i] === "ad-trackeable") { | |
// There are two of these; remove it again | |
document.getElementsByClassName("ad-trackeable")[0].remove(); | |
} | |
} | |
for (var j = 0; j < ids.length; j++) { | |
document.getElementById(ids[j]).remove(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment