Skip to content

Instantly share code, notes, and snippets.

@AstroCB
Last active June 4, 2020 08:06
Show Gist options
  • Save AstroCB/c5ca819db4e0f606cb02 to your computer and use it in GitHub Desktop.
Save AstroCB/c5ca819db4e0f606cb02 to your computer and use it in GitHub Desktop.
Clean up YourListen podcast service
// ==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