Last active
July 11, 2017 10:20
-
-
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
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
// ==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