From 3906e50586b095ec4dd62738e63bc271b624e4c0 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Fri, 11 Nov 2022 07:39:09 +0100 Subject: [PATCH] Remove 5 GEDI.it sites (fix obsolete) --- README.md | 13 +++++-------- changelog.txt | 2 ++ contentScript.js | 10 +--------- lib/purify.min.js | 4 ++-- manifest.json | 5 ----- sites.js | 9 +++------ 6 files changed, 13 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 64decd2..64edf71 100644 --- a/README.md +++ b/README.md @@ -583,19 +583,16 @@ Grouped in options:\ Grouped in options:\ *Gruppo GEDI.it* sites like\ -[GElocal.it](https://quotidiani.gelocal.it) - -[Huffingtonpost.it](https://www.huffingtonpost.it) - -[Il Secolo XIX](https://www.ilsecoloxix.it) - [Italian.tech](https://www.italian.tech) - [La Repubblica](https://www.repubblica.it) - -[La Stampa](https://www.lastampa.it) - -[Le Scienze](https://www.lescienze.it) - -[LimesOnline (it/en)](https://www.limesonline.com)\ +[Le Scienze](https://www.lescienze.it) + [Il Messaggero](https://www.ilmessaggero.it) and regional sites like [Corriere Adriatico](https://www.corriereadriatico.it) - [Il Gazzettino](https://www.ilgazzettino.it) - [Il Mattino](https://www.ilmattino.it) - -[Quotidiano di Puglia](https://www.quotidianodipuglia.it)\ +[Quotidiano di Puglia](https://www.quotidianodipuglia.it) + [Quotidiano Nazionale](https://www.quotidiano.net) and regional sites like [Il Giorno](https://www.ilgiorno.it) - [Il Resto del Carlino](https://www.ilrestodelcarlino.it) - @@ -615,7 +612,7 @@ Grouped in options:\ [Vrij Nederland](https://www.vn.nl) Grouped in options:\ -Algemeen Dagblad (+ regional; link to archive.is) sites like +Algemeen Dagblad (+ regional; link to archive.is) sites like\ [Algemeen Dagblad](https://www.ad.nl) - [BN DeStem](https://www.bndestem.nl) - [Brabants Dagblad](https://www.bd.nl) - diff --git a/changelog.txt b/changelog.txt index e22ce79..0dac9f6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -7,6 +7,8 @@ Add Public.fr Add Record.pt Add The New York Post Remove Dn.no (fix obsolete) +Remove GElocal.it & Huffintonpost.it (fix obsolete) +Remove Il Secolo XIX, La Stampa & Limes Online (fix obsolete) Fix Cmjornal.pt Fix Koelner Stadt-Anzeiger & Koelnische Rundschau Fix La Croix diff --git a/contentScript.js b/contentScript.js index 0db836a..c9e8d11 100644 --- a/contentScript.js +++ b/contentScript.js @@ -20,7 +20,7 @@ var fr_groupe_ebra_domains = ['bienpublic.com', 'dna.fr', 'estrepublicain.fr', ' var fr_groupe_la_depeche_domains = ['centrepresseaveyron.fr', 'ladepeche.fr', 'lindependant.fr', 'midi-olympique.fr', 'midilibre.fr', 'nrpyrenees.fr', 'petitbleu.fr']; var fr_groupe_nice_matin_domains = ['monacomatin.mc', 'nicematin.com', 'varmatin.com']; var it_ilmessaggero_domains = ['corriereadriatico.it', 'ilgazzettino.it', 'ilmattino.it', 'ilmessaggero.it', 'quotidianodipuglia.it']; -var it_gedi_domains = ['gelocal.it', 'huffingtonpost.it', 'ilsecoloxix.it', 'italian.tech', 'lastampa.it', 'lescienze.it', 'limesonline.com', 'repubblica.it']; +var it_gedi_domains = ['italian.tech', 'lescienze.it', 'repubblica.it']; var it_quotidiano_domains = ['ilgiorno.it', 'ilrestodelcarlino.it', 'iltelegrafolivorno.it', 'lanazione.it', 'quotidiano.net']; var medium_custom_domains = ['betterprogramming.pub', 'towardsdatascience.com']; var nl_mediahuis_region_domains = ['gooieneemlander.nl', 'haarlemsdagblad.nl', 'ijmuidercourant.nl', 'leidschdagblad.nl', 'noordhollandsdagblad.nl']; @@ -1851,15 +1851,7 @@ else if (matchDomain(it_gedi_domains)) { elem.removeAttribute('hidden'); elem.removeAttribute('style'); } - csDoneOnce = true; } - } else if (matchDomain('limesonline.com')) { - if (window.location.search.includes('prv=true')) { - window.setTimeout(function () { - window.location.href = window.location.pathname; - }, 500); - } else - csDoneOnce = true; } else if (matchDomain('espresso.repubblica.it')) { if (!window.location.pathname.match(/\amp(\/)?$/)) { let paywall = document.querySelector('div#paywall'); diff --git a/lib/purify.min.js b/lib/purify.min.js index d42a328..644aca0 100644 --- a/lib/purify.min.js +++ b/lib/purify.min.js @@ -1,3 +1,3 @@ -/*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,o,a){return r=n()?Reflect.construct:function(e,n,r){var o=[null];o.push.apply(o,n);var a=new(Function.bind.apply(e,o));return r&&t(a,r.prototype),a},r.apply(null,arguments)}function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n-1:0),o=1;o/gm),q=f(/^data-[\-\w.\u00B7-\uFFFF]/),Y=f(/^aria-[\-\w]+$/),K=f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=f(/^(?:\w+script|data):/i),$=f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=f(/^html$/i),Z=function(){return"undefined"==typeof window?null:window},J=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null,o="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(o)&&(r=n.currentScript.getAttribute(o));var a="dompurify"+(r?"#"+r:"");try{return t.createPolicy(a,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}};var Q=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z(),r=function(e){return t(e)};if(r.version="2.4.0",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;var a=n.document,i=n.document,l=n.DocumentFragment,c=n.HTMLTemplateElement,u=n.Node,s=n.Element,f=n.NodeFilter,p=n.NamedNodeMap,d=void 0===p?n.NamedNodeMap||n.MozNamedAttrMap:p,h=n.HTMLFormElement,g=n.DOMParser,y=n.trustedTypes,_=s.prototype,Q=R(_,"cloneNode"),ee=R(_,"nextSibling"),te=R(_,"childNodes"),ne=R(_,"parentNode");if("function"==typeof c){var re=i.createElement("template");re.content&&re.content.ownerDocument&&(i=re.content.ownerDocument)}var oe=J(y,a),ae=oe?oe.createHTML(""):"",ie=i,le=ie.implementation,ce=ie.createNodeIterator,ue=ie.createDocumentFragment,se=ie.getElementsByTagName,me=a.importNode,fe={};try{fe=D(i).documentMode?i.documentMode:{}}catch(e){}var pe={};r.isSupported="function"==typeof ne&&le&&void 0!==le.createHTMLDocument&&9!==fe;var de,he,ge=G,ye=W,be=q,ve=Y,Te=V,Ne=$,Ae=K,Ee=null,we=O({},[].concat(o(M),o(L),o(C),o(F),o(U))),xe=null,Se=O({},[].concat(o(z),o(j),o(B),o(P))),ke=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),_e=null,Oe=null,De=!0,Re=!0,Me=!1,Le=!1,Ce=!1,Ie=!1,Fe=!1,He=!1,Ue=!1,ze=!1,je=!0,Be=!1,Pe="user-content-",Ge=!0,We=!1,qe={},Ye=null,Ke=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ve=null,$e=O({},["audio","video","img","source","image","track"]),Xe=null,Ze=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml",tt=et,nt=!1,rt=["application/xhtml+xml","text/html"],ot="text/html",at=null,it=i.createElement("form"),lt=function(e){return e instanceof RegExp||e instanceof Function},ct=function(t){at&&at===t||(t&&"object"===e(t)||(t={}),t=D(t),de=de=-1===rt.indexOf(t.PARSER_MEDIA_TYPE)?ot:t.PARSER_MEDIA_TYPE,he="application/xhtml+xml"===de?function(e){return e}:N,Ee="ALLOWED_TAGS"in t?O({},t.ALLOWED_TAGS,he):we,xe="ALLOWED_ATTR"in t?O({},t.ALLOWED_ATTR,he):Se,Xe="ADD_URI_SAFE_ATTR"in t?O(D(Ze),t.ADD_URI_SAFE_ATTR,he):Ze,Ve="ADD_DATA_URI_TAGS"in t?O(D($e),t.ADD_DATA_URI_TAGS,he):$e,Ye="FORBID_CONTENTS"in t?O({},t.FORBID_CONTENTS,he):Ke,_e="FORBID_TAGS"in t?O({},t.FORBID_TAGS,he):{},Oe="FORBID_ATTR"in t?O({},t.FORBID_ATTR,he):{},qe="USE_PROFILES"in t&&t.USE_PROFILES,De=!1!==t.ALLOW_ARIA_ATTR,Re=!1!==t.ALLOW_DATA_ATTR,Me=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Le=t.SAFE_FOR_TEMPLATES||!1,Ce=t.WHOLE_DOCUMENT||!1,He=t.RETURN_DOM||!1,Ue=t.RETURN_DOM_FRAGMENT||!1,ze=t.RETURN_TRUSTED_TYPE||!1,Fe=t.FORCE_BODY||!1,je=!1!==t.SANITIZE_DOM,Be=t.SANITIZE_NAMED_PROPS||!1,Ge=!1!==t.KEEP_CONTENT,We=t.IN_PLACE||!1,Ae=t.ALLOWED_URI_REGEXP||Ae,tt=t.NAMESPACE||et,t.CUSTOM_ELEMENT_HANDLING&<(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ke.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&<(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ke.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ke.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Le&&(Re=!1),Ue&&(He=!0),qe&&(Ee=O({},o(U)),xe=[],!0===qe.html&&(O(Ee,M),O(xe,z)),!0===qe.svg&&(O(Ee,L),O(xe,j),O(xe,P)),!0===qe.svgFilters&&(O(Ee,C),O(xe,j),O(xe,P)),!0===qe.mathMl&&(O(Ee,F),O(xe,B),O(xe,P))),t.ADD_TAGS&&(Ee===we&&(Ee=D(Ee)),O(Ee,t.ADD_TAGS,he)),t.ADD_ATTR&&(xe===Se&&(xe=D(xe)),O(xe,t.ADD_ATTR,he)),t.ADD_URI_SAFE_ATTR&&O(Xe,t.ADD_URI_SAFE_ATTR,he),t.FORBID_CONTENTS&&(Ye===Ke&&(Ye=D(Ye)),O(Ye,t.FORBID_CONTENTS,he)),Ge&&(Ee["#text"]=!0),Ce&&O(Ee,["html","head","body"]),Ee.table&&(O(Ee,["tbody"]),delete _e.tbody),m&&m(t),at=t)},ut=O({},["mi","mo","mn","ms","mtext"]),st=O({},["foreignobject","desc","title","annotation-xml"]),mt=O({},["title","style","font","a","script"]),ft=O({},L);O(ft,C),O(ft,I);var pt=O({},F);O(pt,H);var dt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:et,tagName:"template"});var n=N(e.tagName),r=N(t.tagName);return e.namespaceURI===Qe?t.namespaceURI===et?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===r||ut[r]):Boolean(ft[n]):e.namespaceURI===Je?t.namespaceURI===et?"math"===n:t.namespaceURI===Qe?"math"===n&&st[r]:Boolean(pt[n]):e.namespaceURI===et&&(!(t.namespaceURI===Qe&&!st[r])&&(!(t.namespaceURI===Je&&!ut[r])&&(!pt[n]&&(mt[n]||!ft[n]))))},ht=function(e){T(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ae}catch(t){e.remove()}}},gt=function(e,t){try{T(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){T(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!xe[e])if(He||Ue)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},yt=function(e){var t,n;if(Fe)e=""+e;else{var r=A(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===de&&(e=''+e+"");var o=oe?oe.createHTML(e):e;if(tt===et)try{t=(new g).parseFromString(o,de)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?"":o}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(i.createTextNode(n),a.childNodes[0]||null),tt===et?se.call(t,Ce?"html":"body")[0]:Ce?t.documentElement:a},bt=function(e){return ce.call(e.ownerDocument||e,e,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT,null,!1)},vt=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},Tt=function(t){return"object"===e(u)?t instanceof u:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},Nt=function(e,t,n){pe[e]&&b(pe[e],(function(e){e.call(r,t,n,at)}))},At=function(e){var t;if(Nt("beforeSanitizeElements",e,null),vt(e))return ht(e),!0;if(S(/[\u0080-\uFFFF]/,e.nodeName))return ht(e),!0;var n=he(e.nodeName);if(Nt("uponSanitizeElement",e,{tagName:n,allowedTags:Ee}),e.hasChildNodes()&&!Tt(e.firstElementChild)&&(!Tt(e.content)||!Tt(e.content.firstElementChild))&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return ht(e),!0;if("select"===n&&S(/