LaStampa.it: Hide Annoying popups (the anti-adblock popup and others)

This script hides the annoying popups (the anti-adblock popup and others) that are shown in the web page.

目前為 2025-05-10 提交的版本,檢視 最新版本

// ==UserScript==
// @name           LaStampa.it: Hide Annoying popups (the anti-adblock popup and others)
// @name:it        LaStampa.it: Nasconde i popup fastidiosi (il popup anti-adblock ed altri)
// @description    This script hides the annoying popups (the anti-adblock popup and others) that are shown in the web page.
// @description:it Questo script nasconde i popup fastidiosi (il popup anti-adblock e altri) che vengono visualizzati nella pagina web.
// @match          https://*.lastampa.it/*
// @grant          none
// @require        https://update.gf.qytechs.cn/scripts/535551/1586473/HideAnnoyingPopupsLib.js
// @version        1.0.7
// @author         Cyrano68
// @license        MIT
// @namespace      https://gf.qytechs.cn/users/788550
// ==/UserScript==

(function()
{
    "use strict";

    const myVersion = GM_info.script.version;
    consoleLog(`==> LaStampa_it_HideAnnoyingPopups: HELLO! Loading script (version: ${myVersion})...`);

    function getZeroFilledMillisecs(dateNow)
    {
        const millisecs = dateNow.getMilliseconds();
        return ("00" + millisecs).slice(-3);
    }

    function consoleLog(text)
    {
        const dateNow = new Date();
        //const now = dateNow.toISOString();
        const now = dateNow.toLocaleString() + "." + getZeroFilledMillisecs(dateNow);
        console.log(`${now} ${text}`);
    }

    //document.addEventListener("DOMContentLoaded", onDOMContentLoaded);
    //window.addEventListener("load", onWindowLoaded);

    consoleLog(`==> LaStampa_it_HideAnnoyingPopups: Using library 'HideAnnoyingPopupsLib' (version: ${window.HideAnnoyingPopupsLib.getVersion()})`);

    const mutationObserverConfig = {subtree: true, childList: true};
    const mutatedNodesConfig     = {selectors: ["div.fc-dialog-container", "div#iubenda-cs-banner"]/*, onMutatedNode: onMutatedNode*/};

    window.HideAnnoyingPopupsLib.configure(mutationObserverConfig, mutatedNodesConfig);

    consoleLog("==> LaStampa_it_HideAnnoyingPopups: Script loaded");
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址