diff --git a/changelog.txt b/changelog.txt index 31ab18a..4cb084b 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases Post-release +Fix Mediahuis Noord (json) * v3.3.0.0 (2023-08-20) Add Cieletespace.fr diff --git a/contentScript.js b/contentScript.js index 0162e02..c014066 100644 --- a/contentScript.js +++ b/contentScript.js @@ -2249,11 +2249,13 @@ else if (matchDomain(['lc.nl', 'dvhn.nl']) || document.querySelector('link[href* let html = document.documentElement.outerHTML; if (html.includes('window.__NUXT__=')) { let json = html.split('window.__NUXT__=')[1].split('')[0].trim(); - let url_nuxt = json.match(/[(,]null,/) ? json.split(/[(,]null,/)[1].match(/\d+\.(html|ece)/)[0] : false; + let url_nuxt = json.includes(',canonical:"') ? json.split(',canonical:"')[1].match(/\d+\.(html|ece)/)[0] : false; + if (!url_nuxt) + url_nuxt = json.match(/[(,]null,/) ? json.split(/[(,]null,/)[1].match(/\d+\.(html|ece)/)[0] : false; if (url_nuxt && !window.location.pathname.includes(url_nuxt)) refreshCurrentTab(); else if (json.includes(',body:')) { - let json_text = json.split(',body:')[1].split(/,(leadText|brand_key|tts):/)[0].replace(/([{,])([a-zA-Z_0-9]+\d?):/g, "$1\"$2\":").replace(/\":(\[)?([\w\$\.]+)([\]},])/g, "\":$1\"$2\"$3"); + let json_text = json.split(',body:')[1].split(/,(leadText|brand_key|tts):/)[0].replace(/([{,])(((__)?type(name)?|attributes|author|caption|children|code|href|id|image(Alt|Url)|insertbox_(head|text)|key|link|photographer|rel|relation|section|sourceId|target|text|title|url|value)\d?)(?=:)/g, "$1\"$2\"").replace(/(Image\\":)(\d)([,}])/g, '$1\\"$2\\"$3').replace(/\":(\[)?([\w\$\.]+)([\]},])/g, "\":$1\"$2\"$3"); let article = document.querySelector('div.content'); if (article) { article.innerHTML = ''; @@ -2270,12 +2272,10 @@ else if (matchDomain(['lc.nl', 'dvhn.nl']) || document.querySelector('link[href* } for (let par of pars) { let elem = document.createElement('p'); - if (par.typename === 'HTMLCustomEmbed') { - if (par.code) { - let parser = new DOMParser(); - let article_html = parser.parseFromString('
' + DOMPurify.sanitize(par.code, {ADD_TAGS: ['iframe']}) + '
', 'text/html'); - elem = article_html.querySelector('div'); - } + if (par.code) { + let parser = new DOMParser(); + let article_html = parser.parseFromString('
' + DOMPurify.sanitize(par.code, {ADD_TAGS: ['iframe']}) + '
', 'text/html'); + elem = article_html.querySelector('div'); } else if (par.insertbox_head || par.insertbox_text) { if (par.insertbox_head && par.insertbox_head.length > 2) { addParText(elem, par.insertbox_head, true); diff --git a/custom/manifest.json b/custom/manifest.json index 5851d87..6172850 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.3.0.0" + "version": "3.3.0.1" } diff --git a/manifest.json b/manifest.json index cd6583a..40ca692 100644 --- a/manifest.json +++ b/manifest.json @@ -790,5 +790,5 @@ "*://*.wyleex.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.3.0.0" + "version": "3.3.0.1" } diff --git a/sites.js b/sites.js index c5264c5..6e9c314 100644 --- a/sites.js +++ b/sites.js @@ -1420,7 +1420,7 @@ var defaultSites = { "lc.nl" ], allow_cookies: 1, - block_regex: /(\.evolok\.net\/|\.ndcmediagroep\.nl\/js\/evolok\/)/, + block_regex: /(\.evolok\.net\/|\.ndcmediagroep\.nl\/js\/evolok\/|\.nl\/_\/zh\/worker)/, cs_dompurify: 1 }, "MediaNews Group": { diff --git a/sites_updated.json b/sites_updated.json index aeb8449..5294a1a 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -62,6 +62,17 @@ "remove_cookies_select_drop": ["blaize_session"], "upd_version": "3.2.8.8" }, + "Mediahuis Noord": { + "domain": "###_nl_mediahuis_noord", + "group": [ + "dvhn.nl", + "lc.nl" + ], + "allow_cookies": 1, + "block_regex": "(\\.evolok\\.net\\/|\\.ndcmediagroep\\.nl\\/js\\/evolok\\/|\\.nl\\/_\\/zh\\/worker)", + "cs_dompurify": 1, + "upd_version": "3.3.0.1" + }, "Piano.io (+ TinyPass)": { "domain": "piano.io", "allow_cookies": 1,