Skip to content

Instantly share code, notes, and snippets.

@x1tan
Last active March 18, 2018 13:34
Show Gist options
  • Save x1tan/022723987fb86c84eb22c7d8aee9203a to your computer and use it in GitHub Desktop.
Save x1tan/022723987fb86c84eb22c7d8aee9203a to your computer and use it in GitHub Desktop.
Spiegel++
// ==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