Skip to content

Instantly share code, notes, and snippets.

@x1tan
Last active July 11, 2017 10:20
Show Gist options
  • Save x1tan/00743d9e5106d642509017abe5834403 to your computer and use it in GitHub Desktop.
Save x1tan/00743d9e5106d642509017abe5834403 to your computer and use it in GitHub Desktop.
Tampermonkey script to remove all appearances of articles or links to bento.de from the news portal spiegel.de
// ==UserScript==
// @name Bento Link Remover
// @namespace http://tampermonkey.net/
// @version 0.4
// @description Removes all appearances of articles or links to bento.de from the news portal spiegel.de
// @author xitan
// @match http://www.spiegel.de/
// @grant none
// @updateURL https://gist.githubusercontent.com/x1tan/00743d9e5106d642509017abe5834403/raw
// ==/UserScript==
(function() {
'use strict';
document.getElementsByClassName("clearfix module-box bento")[0].style.display = 'none';
for(var i = 0, l=document.links.length; i<l; i++) {
if (document.links[i].href.includes("bento")) {
console.log(document.links[i].href);
var parentNode = document.links[i].parentNode;
parentNode.style.display = 'none';
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment