Gazzetta.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.

  1. // ==UserScript==
  2. // @name Gazzetta.it: Hide Annoying popups (the anti-adblock popup and others)
  3. // @name:it Gazzetta.it: Nasconde i popup fastidiosi (il popup anti-adblock ed altri)
  4. // @description This script hides the annoying popups (the anti-adblock popup and others) that are shown in the web page.
  5. // @description:it Questo script nasconde i popup fastidiosi (il popup anti-adblock e altri) che vengono visualizzati nella pagina web.
  6. // @match https://*.gazzetta.it/*
  7. // @grant none
  8. // @require https://updategreasyfork.deno.dev/scripts/535551/1586801/HideAnnoyingPopupsLib.js
  9. // @version 1.0.7
  10. // @author Cyrano68
  11. // @license MIT
  12. // @namespace https://gf.zukizuki.org/users/788550
  13. // ==/UserScript==
  14.  
  15. (function()
  16. {
  17. "use strict";
  18.  
  19. const haplib = window.HideAnnoyingPopupsLib;
  20.  
  21. const myVersion = GM_info.script.version;
  22. haplib.consoleLog(`==> Gazzetta_it_HideAnnoyingPopups: HELLO! Loading script (version: ${myVersion})...`);
  23.  
  24. //document.addEventListener("DOMContentLoaded", onDOMContentLoaded);
  25. //window.addEventListener("load", onWindowLoaded);
  26.  
  27. haplib.consoleLog(`==> Gazzetta_it_HideAnnoyingPopups: Using library 'HideAnnoyingPopupsLib' (version: ${haplib.getVersion()})`);
  28. const mutationObserverConfig = {subtree: true, childList: true, attributes: true, attributeOldValue: true, attributeFilter: ["class"]};
  29. const mutatedNodesConfig = {selectors: ["div.privacy-cp-wall", "div.bck-adblock"]/*, onMutatedNode: onMutatedNode*/};
  30. const mutatedAttributesConfig = {attributeInfos: [{attributeName: "class", targetTagName: "HTML"}, {attributeName: "class", targetTagName: "BODY"}]/*, onMutatedAttribute: onMutatedAttribute*/};
  31. haplib.configure(mutationObserverConfig, mutatedNodesConfig, mutatedAttributesConfig);
  32.  
  33. haplib.consoleLog("==> Gazzetta_it_HideAnnoyingPopups: Script loaded");
  34. })();