// ==UserScript== // @name Customize Zeit Online // @namespace https://greasyfork.org/en/users/689160-georg-vogt // @version 2.3.1 // @description Entferne unerwünschte Artikel/Abschnitte aus Zeit Online // @author Georg Vogt // @match https://www.zeit.de/* // @grant GM_setValue // @grant GM_getValue // @downloadURL none // ==/UserScript== 'use strict'; var customBadSections = {}; var customBadHeadings = {}; var customBadQueries = {}; customBadSections = GM_getValue("customBadSections", {}); customBadHeadings = GM_getValue("customBadHeadings", {}); customBadQueries = GM_getValue("customBadQueries", {}); //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// // Customize // customBadSections["newsticker"] = true; // customBadHeadings["Video"] = true; // customBadQueries["*[href='https://www.zeit.de/kaenguru-comics-marc-uwe-kling-bernd-kissel ']"] = 2; //////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// GM_setValue("customBadSections", customBadSections); GM_setValue("customBadHeadings", customBadHeadings); GM_setValue("customBadHeadings", customBadQueries); console.log("TM: Custom settings:", customBadSections, customBadHeadings, customBadQueries); function hideNode(node) { try { node.style.display = 'none'; // node.style.background = 'red'; // debug } catch {} } function hideParent(node, num) { for (var i=0; i= 0) { hideParent(document.querySelector(query), num); } } // remove sidebar Zeit+ const sideBox = document.querySelector("aside.topicbox"); if (sideBox?.childNodes[1]?.childNodes[1]?.innerText == "DAS BESTE AUS Z+") { hideNode(sideBox); } // remove paywall footer const callback = function(mutationsList, observer) { for(const mutation of mutationsList) { for (const node of mutation.addedNodes) { try { if (node.getAttribute("class") == "paywall-footer paywall-footer--expandable ") { hideNode(node); } } catch {} } } }; const observer = new MutationObserver(callback); observer.observe(document.body, {childList: true});