This script hides the annoying popups (the anti-adblock popup and others) that are shown in the web page.
当前为
// ==UserScript==
// @name Ansa.it: Hide Annoying popups (the anti-adblock popup and others)
// @name:it Ansa.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://*.ansa.it/*
// @grant none
// @require https://update.greasyfork.org/scripts/535551/1586801/HideAnnoyingPopupsLib.js
// @version 1.0.1
// @author Cyrano68
// @license MIT
// @namespace https://greasyfork.org/users/788550
// ==/UserScript==
(function()
{
"use strict";
const haplib = window.HideAnnoyingPopupsLib;
const myVersion = GM_info.script.version;
haplib.consoleLog(`==> Ansa_it_HideAnnoyingPopups: HELLO! Loading script (version: ${myVersion})...`);
//document.addEventListener("DOMContentLoaded", onDOMContentLoaded);
//window.addEventListener("load", onWindowLoaded);
haplib.consoleLog(`==> Ansa_it_HideAnnoyingPopups: Using library 'HideAnnoyingPopupsLib' (version: ${haplib.getVersion()})`);
const mutationObserverConfig = {subtree: true, childList: true, attributes: true, attributeOldValue: true, attributeFilter: ["style"]};
const mutatedNodesConfig = {selectors: ["div#iubenda-cs-banner", "div.tp-container-inner"]/*, onMutatedNode: onMutatedNode*/};
const mutatedAttributesConfig = {attributeInfos: [{attributeName: "style", targetTagName: "HTML"}]/*, onMutatedAttribute: onMutatedAttribute*/};
haplib.configure(mutationObserverConfig, mutatedNodesConfig, mutatedAttributesConfig);
haplib.consoleLog("==> Ansa_it_HideAnnoyingPopups: Script loaded");
})();