)/);
let page_items = json.contentPage.data.context.elements;
if (json_text && page_items) {
- let parser = new DOMParser();
let n = 0;
let new_article = document.createElement('div');
new_article.setAttribute('style', 'font-size: 17px; font-family:Calibri, Helvetica, Arial; margin: auto; max-width: 620px;');
@@ -1565,7 +1573,7 @@ else if (matchDomain('lanouvellerepublique.fr')) {
else if (matchDomain('lecourrierdesstrateges.fr')) {
window.setTimeout(function () {
let paywall = document.querySelector('div.jpw-truncate-btn');
- if (paywall) {
+ if (paywall && dompurify_loaded) {
removeDOMElement(paywall);
let json_script = getArticleJsonScript();
if (json_script) {
@@ -1575,7 +1583,7 @@ else if (matchDomain('lecourrierdesstrateges.fr')) {
let content = document.querySelector('div.content-inner');
if (json_text && content) {
let parser = new DOMParser();
- let doc = parser.parseFromString('
' + json_text + '
', 'text/html');
+ let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text) + '
', 'text/html');
let content_new = doc.querySelector('div');
content.parentNode.replaceChild(content_new, content);
let hidden_images = document.querySelectorAll('img[src][srcset]');
@@ -1668,7 +1676,7 @@ else if (matchDomain('lesechos.fr')) {
let abo_banner = document.querySelector('div[class*="pgxf3b-2"]');
let ad_blocks = document.querySelectorAll('[class*="jzxvkd"]');
hideDOMElement(...ad_blocks);
- if (abo_banner) {
+ if (abo_banner && dompurify_loaded) {
removeDOMElement(abo_banner);
let url = window.location.href;
let html = document.documentElement.outerHTML;
@@ -1686,7 +1694,7 @@ else if (matchDomain('lesechos.fr')) {
if (paywallNode) {
let contentNode = document.createElement('div');
let parser = new DOMParser();
- let article_html = parser.parseFromString('
' + article + '
', 'text/html');
+ let article_html = parser.parseFromString('
' + DOMPurify.sanitize(article) + '
', 'text/html');
let article_par = article_html.querySelector('div');
if (article_par) {
contentNode.appendChild(article_par);
@@ -1740,12 +1748,12 @@ else if (matchDomain('loeildelaphotographie.com')) {
else if (matchDomain('marianne.net')) {
let paywall = document.querySelector('div.paywall');
- if (paywall) {
+ if (paywall && dompurify_loaded) {
let article_source = document.querySelector('div.article-body[data-content-src]');
if (article_source) {
let article_text = decode_utf8(atob(article_source.getAttribute('data-content-src')));
let parser = new DOMParser();
- let html = parser.parseFromString('
' + article_text + '
', 'text/html');
+ let html = parser.parseFromString('
' + DOMPurify.sanitize(article_text) + '
', 'text/html');
let article = html.querySelector('div');
article_source.innerHTML = '';
article_source.appendChild(article);
@@ -1904,7 +1912,7 @@ else if (matchDomain('ilmanifesto.it')) {
window.setTimeout(function () {
if (window.location.pathname.match(/((\w)+(\-)+){3,}/)) {
let paywall = document.querySelector('div[class^="PostPaywall_PostPaywall__"]');
- if (paywall) {
+ if (paywall && dompurify_loaded) {
removeDOMElement(paywall);
let json_script = document.querySelector('script#__NEXT_DATA__');
if (json_script) {
@@ -1915,7 +1923,7 @@ else if (matchDomain('ilmanifesto.it')) {
if (article) {
article.innerHTML = '';
let parser = new DOMParser();
- let doc = parser.parseFromString('
' + article_new + '
', 'text/html');
+ let doc = parser.parseFromString('
' + DOMPurify.sanitize(article_new) + '
', 'text/html');
let content_new = doc.querySelector('div');
article.appendChild(content_new);
}
@@ -1936,7 +1944,7 @@ else if (matchDomain('ilmanifesto.it')) {
else if (matchDomain(['iltirreno.it', 'lanuovasardegna.it'])) {
if (window.location.pathname.includes('/news/')) {
let paywall = document.querySelector('div.MuiBox-root > h4.MuiTypography-h4');
- if (paywall) {
+ if (paywall && dompurify_loaded) {
let article = document.querySelector('div.MuiGrid-root.MuiGrid-grid-sm-7 > div');
if (article) {
removeDOMElement(paywall.parentNode);
@@ -1952,7 +1960,7 @@ else if (matchDomain(['iltirreno.it', 'lanuovasardegna.it'])) {
let article_new = JSON.parse(json.text).props.pageProps.article.content;
if (article_new) {
let parser = new DOMParser();
- let doc = parser.parseFromString('
' + article_new + '
', 'text/html');
+ let doc = parser.parseFromString('
' + DOMPurify.sanitize(article_new) + '
', 'text/html');
let content_new = doc.querySelector('div');
article.innerHTML = '';
article.appendChild(content_new);
@@ -1999,7 +2007,7 @@ else if (matchDomain(it_quotidiano_domains)) {
else if (matchDomain('italiaoggi.it')) {
let paywall = document.querySelector('div.boxAbb');
- if (paywall) {
+ if (paywall && dompurify_loaded) {
let overlay = document.querySelector('div.article-locked-overlay');
removeDOMElement(paywall, overlay);
let article_locked = document.querySelector('div.article-locked');
@@ -2014,7 +2022,7 @@ else if (matchDomain('italiaoggi.it')) {
if (json_text && content) {
let parser = new DOMParser();
json_text = json_text.replace(/'/g, "'").replace(/;/g, '');
- let doc = parser.parseFromString('
' + json_text + '
', 'text/html');
+ let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text) + '
', 'text/html');
let content_new = doc.querySelector('div');
content.parentNode.replaceChild(content_new, content);
}
@@ -2138,7 +2146,7 @@ else if (matchDomain(be_roularta_domains)) {
else if (matchDomain(['lc.nl', 'dvhn.nl'])) {
if (true) {
let paywall = document.querySelector('div.signupPlus, div.pw-wrapper');
- if (paywall) {
+ if (paywall && dompurify_loaded) {
let intro = document.querySelector('div.startPayWall');
removeDOMElement(paywall, intro);
let html = document.documentElement.outerHTML;
@@ -2170,7 +2178,7 @@ else if (matchDomain(['lc.nl', 'dvhn.nl'])) {
if (par.typename === 'HTMLCustomEmbed') {
if (par.code) {
let parser = new DOMParser();
- let article_html = parser.parseFromString('
' + par.code + '
', 'text/html');
+ let article_html = parser.parseFromString('
' + DOMPurify.sanitize(par.code) + '
', 'text/html');
elem = article_html.querySelector('div');
}
} else if (par.insertbox_head || par.insertbox_text) {
@@ -2251,7 +2259,7 @@ else if (matchDomain(nl_mediahuis_region_domains)) {
if (close_button)
close_button.click();
let premium = document.querySelector('div.common-components-plus_pluslabel--container');
- if (premium) {
+ if (premium && dompurify_loaded) {
let hidden_article = document.querySelector('div[data-auth-body="article"]');
if (hidden_article)
hidden_article.removeAttribute('style');
@@ -2275,7 +2283,7 @@ else if (matchDomain(nl_mediahuis_region_domains)) {
par_elem = '';
par_key = par[key];
if (key === 'subhead') {
- par_html = parser.parseFromString('
' + DOMPurify.sanitize(par_key) + '', 'text/html');
par_elem = par_html.querySelector('p');
}
if (par_elem)
@@ -2424,7 +2432,7 @@ else if (matchDomain('telegraaf.nl')) {
else if (matchDomain('vn.nl')) {
let paywall = document.querySelector('div.content__message-no-access-container');
- if (paywall) {
+ if (paywall && dompurify_loaded) {
let content_restriction = document.querySelector('div.content__restriction');
removeDOMElement(paywall, content_restriction);
let body = document.querySelector('body');
@@ -2444,7 +2452,7 @@ else if (matchDomain('vn.nl')) {
let content = document.querySelector('div[data-article-content-target]');
if (json_text && content) {
let parser = new DOMParser();
- let doc = parser.parseFromString('
' + json_text + '
', 'text/html');
+ let doc = parser.parseFromString('
', 'text/html');
let article_new = doc.querySelector('div');
if (article_new) {
article.parentNode.replaceChild(article_new, article);
@@ -3255,7 +3228,7 @@ else if (matchDomain('dallasnews.com')) {
else if (matchDomain('defector.com')) {
let paywall = document.querySelector('[class^="ContentGate_wrapper__"]');
- if (paywall) {
+ if (paywall && dompurify_loaded) {
removeDOMElement(paywall);
let url = window.location.href;
try {
@@ -3268,7 +3241,7 @@ else if (matchDomain('defector.com')) {
let article_new = doc.querySelector('div[class^="PostContent_wrapper__"]');
let article = document.querySelector('div[class^="PostContent_wrapper__"]');
if (article && article_new)
- article.parentNode.replaceChild(article_new, article);
+ article.parentNode.replaceChild(DOMPurify.sanitize(article_new), article);
});
}
});
@@ -3659,7 +3632,7 @@ else if (matchDomain('inkl.com')) {
else if (matchDomain('ipolitics.ca')) {
let login = document.querySelector('div.login');
- if (login) {
+ if (login && dompurify_loaded) {
removeDOMElement(login);
let json_script = document.querySelector('script#__NEXT_DATA__');
if (json_script) {
@@ -3675,7 +3648,7 @@ else if (matchDomain('ipolitics.ca')) {
article.innerHTML = '';
article.classList.remove('locked');
let parser = new DOMParser();
- let doc = parser.parseFromString('
' + article_new + '
', 'text/html');
+ let doc = parser.parseFromString('
' + DOMPurify.sanitize(article_new) + '
', 'text/html');
let content_new = doc.querySelector('div');
article.appendChild(content_new);
}
@@ -3910,7 +3883,7 @@ else if (matchDomain('nzherald.co.nz')) {
else if (matchDomain('outlookbusiness.com')) {
let paywall = document.querySelector('div#csc-paywall');
- if (paywall) {
+ if (paywall && dompurify_loaded) {
removeDOMElement(paywall);
let json_script = document.querySelector('script#__NEXT_DATA__');
if (json_script) {
@@ -3921,7 +3894,7 @@ else if (matchDomain('outlookbusiness.com')) {
if (article) {
article.innerHTML = '';
let parser = new DOMParser();
- let doc = parser.parseFromString('
' + article_new + '
', 'text/html');
+ let doc = parser.parseFromString('
' + DOMPurify.sanitize(article_new) + '
', 'text/html');
let content_new = doc.querySelector('div');
article.appendChild(content_new);
}
@@ -4156,7 +4129,7 @@ else if (matchDomain('stratfor.com')) {
hidden_image.setAttribute('src', hidden_image.getAttribute('data-src'));
if (window.location.pathname.match(/(\/(\d){4}-([a-z]|-)+-forecast(-([a-z]|-)+)?|-forecast-(\d){4}-([a-z]|[0-9]|-)+)$/)) {
let json_script = document.querySelector('script#__NEXT_DATA__');
- if (json_script) {
+ if (json_script && dompurify_loaded) {
let json = JSON.parse(json_script.innerText);
if (json && json.props.pageProps.data) {
let overview_div = document.querySelector('div[class^="overview_overview__"] > div');
@@ -4166,7 +4139,7 @@ else if (matchDomain('stratfor.com')) {
let data_overview = data.overview;
if (!parseHtmlEntities(data_overview).includes(data.teaser_body))
data_overview = '
' + data.teaser_body + '
' + data_overview;
- let doc = parser.parseFromString('
' + data_overview + '
Sections
' + '
', 'text/html');
+ let doc = parser.parseFromString('
' + DOMPurify.sanitize(data_overview) + '
Sections
' + '
', 'text/html');
let content_new = doc.querySelector('div');
let sections = data.section;
for (let section of sections) {
@@ -4215,7 +4188,7 @@ else if (matchDomain('studocu.com')) {
else if (matchDomain('techinasia.com')) {
let paywall = document.querySelector('.paywall-content');
- if (paywall) {
+ if (paywall && dompurify_loaded) {
paywall.classList.remove('paywall-content');
let url = window.location.href;
let url_xhr = url.replace('.com/', '.com/wp-json/techinasia/2.0/posts/').replace('/visual-story/', '/');
@@ -4228,7 +4201,7 @@ else if (matchDomain('techinasia.com')) {
let content = document.querySelector('div.content');
if (json_text && content) {
let parser = new DOMParser();
- let doc = parser.parseFromString('
' + json_text + '
', 'text/html');
+ let doc = parser.parseFromString('
' + DOMPurify.sanitize(json_text) + '
', 'text/html');
let content_new = doc.querySelector('div.content');
content.parentNode.replaceChild(content_new, content);
}
@@ -4639,7 +4612,7 @@ else if (matchDomain(no_nhst_media_domains)) {
} else {
window.setTimeout(function () {
let paywall = document.querySelector('iframe#paywall-iframe');
- if (paywall) {
+ if (paywall && dompurify_loaded) {
let intro = document.querySelector('div.global-article-selector');
let article = paywall.parentNode;
removeDOMElement(paywall, intro);
@@ -4654,7 +4627,7 @@ else if (matchDomain(no_nhst_media_domains)) {
if (json) {
let json_text = json.article.body;
let parser = new DOMParser();
- let doc = parser.parseFromString('
' + json_text + '
', 'text/html');
+ let doc = parser.parseFromString('
', 'text/html');
let article_new = doc.querySelector('div');
if (article_new) {
if (article)
@@ -4785,7 +4758,7 @@ else if (matchDomain('wsj.com')) {
else if (matchDomain('zerohedge.com')) {
window.setTimeout(function () {
let paywall = document.querySelector('div[class^="PremiumOverlay_container__"]');
- if (paywall) {
+ if (paywall && dompurify_loaded) {
removeDOMElement(paywall);
let json_script = document.querySelector('script#__NEXT_DATA__');
if (json_script) {
@@ -4797,7 +4770,7 @@ else if (matchDomain('zerohedge.com')) {
if (article) {
article.innerHTML = '';
let parser = new DOMParser();
- let doc = parser.parseFromString('
' + article_new + '
', 'text/html');
+ let doc = parser.parseFromString('
' + DOMPurify.sanitize(article_new) + '
', 'text/html');
let content_new = doc.querySelector('div');
article.appendChild(content_new);
}
@@ -5012,7 +4985,8 @@ function replaceDomElementExtSrc(url, html, proxy, base64, selector, text_fail =
}
let parser = new DOMParser();
window.setTimeout(function () {
- let doc = parser.parseFromString(html, 'text/html');
+ let doc = parser.parseFromString(DOMPurify.sanitize(html, {ADD_ATTR: ['layout', 'itemprop'], ADD_TAGS: ['amp-img', 'iframe']}), 'text/html');
+ //console.log(DOMPurify.removed);
let article_new = doc.querySelector(selector_source);
if (article_new) {
if (article && article.parentNode)
diff --git a/custom/manifest.json b/custom/manifest.json
index 23ab493..0cbaa53 100644
--- a/custom/manifest.json
+++ b/custom/manifest.json
@@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
- "version": "3.1.7.1"
+ "version": "3.1.7.2"
}
diff --git a/lib/empty.js b/lib/empty.js
new file mode 100644
index 0000000..e69de29
diff --git a/lib/purify.min.js b/lib/purify.min.js
new file mode 100644
index 0000000..6baa5c9
--- /dev/null
+++ b/lib/purify.min.js
@@ -0,0 +1,3 @@
+/*! @license DOMPurify 3.0.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.3/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";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;c||(c=function(e,t,n){return e.apply(t,n)}),i||(i=function(e){return e}),a||(a=function(e){return e}),s||(s=function(e,t){return new e(...t)});const m=b(Array.prototype.forEach),u=b(Array.prototype.pop),f=b(Array.prototype.push),p=b(String.prototype.toLowerCase),d=b(String.prototype.toString),h=b(String.prototype.match),g=b(String.prototype.replace),T=b(String.prototype.indexOf),y=b(String.prototype.trim),E=b(RegExp.prototype.test),A=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),r=1;r/gm),H=a(/\${[\w\W]*}/gm),z=a(/^data-[\-\w.\u00B7-\uFFFF]/),B=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=a(/^(?:\w+script|data):/i),Y=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),j=a(/^html$/i);var q=Object.freeze({__proto__:null,MUSTACHE_EXPR:P,ERB_EXPR:F,TMPLIT_EXPR:H,DATA_ATTR:z,ARIA_ATTR:B,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:Y,DOCTYPE_NAME:j});const X=()=>"undefined"==typeof window?null:window,K=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};var V=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X();const o=e=>t(e);if(o.version="3.0.3",o.removed=[],!n||!n.document||9!==n.document.nodeType)return o.isSupported=!1,o;const r=n.document,a=r.currentScript;let{document:l}=n;const{DocumentFragment:c,HTMLTemplateElement:s,Node:_,Element:b,NodeFilter:P,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:H,DOMParser:z,trustedTypes:B}=n,G=b.prototype,Y=R(G,"cloneNode"),V=R(G,"nextSibling"),$=R(G,"childNodes"),Z=R(G,"parentNode");if("function"==typeof s){const e=l.createElement("template");e.content&&e.content.ownerDocument&&(l=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:ne,getElementsByTagName:oe}=l,{importNode:re}=r;let ie={};o.isSupported="function"==typeof e&&"function"==typeof Z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:le,TMPLIT_EXPR:ce,DATA_ATTR:se,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:fe}=q;let{IS_ALLOWED_URI:pe}=q,de=null;const he=N({},[...w,...D,...L,...x,...k]);let ge=null;const Te=N({},[...O,...I,...M,...U]);let ye=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}})),Ee=null,Ae=null,_e=!0,be=!0,Ne=!1,Se=!0,Re=!1,we=!1,De=!1,Le=!1,ve=!1,xe=!1,Ce=!1,ke=!0,Oe=!1;const Ie="user-content-";let Me=!0,Ue=!1,Pe={},Fe=null;const He=N({},["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"]);let ze=null;const Be=N({},["audio","video","img","source","image","track"]);let We=null;const Ge=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",je="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml";let Xe=qe,Ke=!1,Ve=null;const $e=N({},[Ye,je,qe],d);let Ze;const Je=["application/xhtml+xml","text/html"],Qe="text/html";let et,tt=null;const nt=l.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},rt=function(e){if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=S(e),Ze=Ze=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?Qe:e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Ze?d:p,de="ALLOWED_TAGS"in e?N({},e.ALLOWED_TAGS,et):he,ge="ALLOWED_ATTR"in e?N({},e.ALLOWED_ATTR,et):Te,Ve="ALLOWED_NAMESPACES"in e?N({},e.ALLOWED_NAMESPACES,d):$e,We="ADD_URI_SAFE_ATTR"in e?N(S(Ge),e.ADD_URI_SAFE_ATTR,et):Ge,ze="ADD_DATA_URI_TAGS"in e?N(S(Be),e.ADD_DATA_URI_TAGS,et):Be,Fe="FORBID_CONTENTS"in e?N({},e.FORBID_CONTENTS,et):He,Ee="FORBID_TAGS"in e?N({},e.FORBID_TAGS,et):{},Ae="FORBID_ATTR"in e?N({},e.FORBID_ATTR,et):{},Pe="USE_PROFILES"in e&&e.USE_PROFILES,_e=!1!==e.ALLOW_ARIA_ATTR,be=!1!==e.ALLOW_DATA_ATTR,Ne=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,we=e.WHOLE_DOCUMENT||!1,ve=e.RETURN_DOM||!1,xe=e.RETURN_DOM_FRAGMENT||!1,Ce=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,ke=!1!==e.SANITIZE_DOM,Oe=e.SANITIZE_NAMED_PROPS||!1,Me=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,pe=e.ALLOWED_URI_REGEXP||W,Xe=e.NAMESPACE||qe,ye=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ye.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ye.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ye.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(be=!1),xe&&(ve=!0),Pe&&(de=N({},[...k]),ge=[],!0===Pe.html&&(N(de,w),N(ge,O)),!0===Pe.svg&&(N(de,D),N(ge,I),N(ge,U)),!0===Pe.svgFilters&&(N(de,L),N(ge,I),N(ge,U)),!0===Pe.mathMl&&(N(de,x),N(ge,M),N(ge,U))),e.ADD_TAGS&&(de===he&&(de=S(de)),N(de,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===Te&&(ge=S(ge)),N(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&N(We,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Fe===He&&(Fe=S(Fe)),N(Fe,e.FORBID_CONTENTS,et)),Me&&(de["#text"]=!0),we&&N(de,["html","head","body"]),de.table&&(N(de,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=K(B,a)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));i&&i(e),tt=e}},it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["foreignobject","desc","title","annotation-xml"]),lt=N({},["title","style","font","a","script"]),ct=N({},D);N(ct,L),N(ct,v);const st=N({},x);N(st,C);const mt=function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Xe,tagName:"template"});const n=p(e.tagName),o=p(t.tagName);return!!Ve[e.namespaceURI]&&(e.namespaceURI===je?t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ye?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ct[n]):e.namespaceURI===Ye?t.namespaceURI===qe?"math"===n:t.namespaceURI===je?"math"===n&&at[o]:Boolean(st[n]):e.namespaceURI===qe?!(t.namespaceURI===je&&!at[o])&&(!(t.namespaceURI===Ye&&!it[o])&&(!st[n]&&(lt[n]||!ct[n]))):!("application/xhtml+xml"!==Ze||!Ve[e.namespaceURI]))},ut=function(e){f(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(ve||xe)try{ut(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},pt=function(e){let t,n;if(Le)e=""+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ze&&Xe===qe&&(e=''+e+"");const o=J?J.createHTML(e):e;if(Xe===qe)try{t=(new z).parseFromString(o,Ze)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=Ke?Q:o}catch(e){}}const r=t.body||t.documentElement;return e&&n&&r.insertBefore(l.createTextNode(n),r.childNodes[0]||null),Xe===qe?oe.call(t,we?"html":"body")[0]:we?t.documentElement:r},dt=function(e){return te.call(e.ownerDocument||e,e,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT,null,!1)},ht=function(e){return e instanceof H&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof F)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},gt=function(e){return"object"==typeof _?e instanceof _:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Tt=function(e,t,n){ie[e]&&m(ie[e],(e=>{e.call(o,t,n,tt)}))},yt=function(e){let t;if(Tt("beforeSanitizeElements",e,null),ht(e))return ut(e),!0;const n=et(e.nodeName);if(Tt("uponSanitizeElement",e,{tagName:n,allowedTags:de}),e.hasChildNodes()&&!gt(e.firstElementChild)&&(!gt(e.content)||!gt(e.content.firstElementChild))&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ut(e),!0;if(!de[n]||Ee[n]){if(!Ee[n]&&At(n)){if(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n))return!1;if(ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))return!1}if(Me&&!Fe[n]){const t=Z(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o)t.insertBefore(Y(n[o],!0),V(e))}}return ut(e),!0}return e instanceof b&&!mt(e)?(ut(e),!0):"noscript"!==n&&"noembed"!==n||!E(/<\/no(script|embed)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,t=g(t,ae," "),t=g(t,le," "),t=g(t,ce," "),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Tt("afterSanitizeElements",e,null),!1):(ut(e),!0)},Et=function(e,t,n){if(ke&&("id"===t||"name"===t)&&(n in l||n in nt))return!1;if(be&&!Ae[t]&&E(se,t));else if(_e&&E(me,t));else if(!ge[t]||Ae[t]){if(!(At(e)&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,e)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(e))&&(ye.attributeNameCheck instanceof RegExp&&E(ye.attributeNameCheck,t)||ye.attributeNameCheck instanceof Function&&ye.attributeNameCheck(t))||"is"===t&&ye.allowCustomizedBuiltInElements&&(ye.tagNameCheck instanceof RegExp&&E(ye.tagNameCheck,n)||ye.tagNameCheck instanceof Function&&ye.tagNameCheck(n))))return!1}else if(We[t]);else if(E(pe,g(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!ze[e]){if(Ne&&!E(ue,g(n,fe,"")));else if(n)return!1}else;return!0},At=function(e){return e.indexOf("-")>0},_t=function(e){let t,n,r,i;Tt("beforeSanitizeAttributes",e,null);const{attributes:a}=e;if(!a)return;const l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(i=a.length;i--;){t=a[i];const{name:c,namespaceURI:s}=t;if(n="value"===c?t.value:y(t.value),r=et(c),l.attrName=r,l.attrValue=n,l.keepAttr=!0,l.forceKeepAttr=void 0,Tt("uponSanitizeAttribute",e,l),n=l.attrValue,l.forceKeepAttr)continue;if(ft(c,e),!l.keepAttr)continue;if(!Se&&E(/\/>/i,n)){ft(c,e);continue}Re&&(n=g(n,ae," "),n=g(n,le," "),n=g(n,ce," "));const m=et(e.nodeName);if(Et(m,r,n)){if(!Oe||"id"!==r&&"name"!==r||(ft(c,e),n=Ie+n),J&&"object"==typeof B&&"function"==typeof B.getAttributeType)if(s);else switch(B.getAttributeType(m,r)){case"TrustedHTML":n=J.createHTML(n);break;case"TrustedScriptURL":n=J.createScriptURL(n)}try{s?e.setAttributeNS(s,c,n):e.setAttribute(c,n),u(o.removed)}catch(e){}}}Tt("afterSanitizeAttributes",e,null)},bt=function e(t){let n;const o=dt(t);for(Tt("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)Tt("uponSanitizeShadowNode",n,null),yt(n)||(n.content instanceof c&&e(n.content),_t(n));Tt("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e){let t,n,i,a,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ke=!e,Ke&&(e="\x3c!--\x3e"),"string"!=typeof e&&!gt(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!o.isSupported)return e;if(De||rt(l),o.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=et(e.nodeName);if(!de[t]||Ee[t])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof _)t=pt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!ve&&!Re&&!we&&-1===e.indexOf("<"))return J&&Ce?J.createHTML(e):e;if(t=pt(e),!t)return ve?null:Ce?Q:""}t&&Le&&ut(t.firstChild);const s=dt(Ue?e:t);for(;i=s.nextNode();)yt(i)||(i.content instanceof c&&bt(i.content),_t(i));if(Ue)return e;if(ve){if(xe)for(a=ne.call(t.ownerDocument);t.firstChild;)a.appendChild(t.firstChild);else a=t;return(ge.shadowroot||ge.shadowrootmod)&&(a=re.call(r,a,!0)),a}let m=we?t.outerHTML:t.innerHTML;return we&&de["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&E(j,t.ownerDocument.doctype.name)&&(m="\n"+m),Re&&(m=g(m,ae," "),m=g(m,le," "),m=g(m,ce," ")),J&&Ce?J.createHTML(m):m},o.setConfig=function(e){rt(e),De=!0},o.clearConfig=function(){tt=null,De=!1},o.isValidAttribute=function(e,t,n){tt||rt({});const o=et(e),r=et(t);return Et(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],f(ie[e],t))},o.removeHook=function(e){if(ie[e])return u(ie[e])},o.removeHooks=function(e){ie[e]&&(ie[e]=[])},o.removeAllHooks=function(){ie={}},o}();return V}));
+//# sourceMappingURL=purify.min.js.map
diff --git a/manifest.json b/manifest.json
index d24ef93..401ea66 100644
--- a/manifest.json
+++ b/manifest.json
@@ -754,5 +754,5 @@
"*://html.onlineviewer.net/*",
"*://webcache.googleusercontent.com/*"
],
- "version": "3.1.7.1"
+ "version": "3.1.7.2"
}
diff --git a/options/optin/opt-in.html b/options/optin/opt-in.html
index 4a5aa0a..fc857bf 100644
--- a/options/optin/opt-in.html
+++ b/options/optin/opt-in.html
@@ -4,7 +4,7 @@
- Bypass Paywalls Clean (setCookie/custom sites opt-in)
+ Bypass Paywalls Clean (setCookie, custom sites & check update opt-in)
@@ -12,9 +12,18 @@