Last active
March 18, 2018 13:34
-
-
Save x1tan/022723987fb86c84eb22c7d8aee9203a to your computer and use it in GitHub Desktop.
Spiegel++
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 Spiegel++ | |
// @namespace http://tampermonkey.net/ | |
// @version 0.9 | |
// @description Spiegel++ is an enhancement tool for better usability while browsing spiegel.de (e.g. free spiegel plus articles, content related to bento.de removed) | |
// @author xitan | |
// @match http://www.spiegel.de/* | |
// @updateURL https://gist.github.com/x1tan/022723987fb86c84eb22c7d8aee9203a/raw | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// Remove everything related to bento | |
if (window.location.host == "http://www.spiegel.de/") { | |
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")) { | |
if (document.links[i].parentNode) { | |
document.links[i].parentNode.style.display = 'none'; | |
} | |
} | |
} | |
setTimeout(function() { | |
// Unblock plus articles | |
var obfuscatedContent = document.getElementsByClassName('obfuscated-content'); | |
if (obfuscatedContent.length > 0) { | |
SPLaterpay.callback.hasAccess(); | |
$('.lp_mwi_payment-method-wrapper').parent().parent().hide(); | |
$('.deobfuscated-content').parent().removeClass(); | |
} | |
}, 500); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment