diff --git a/background.js b/background.js index 0a803fc..d54943a 100644 --- a/background.js +++ b/background.js @@ -1411,7 +1411,10 @@ ext_api.runtime.onMessage.addListener(function (message, sender) { if (group) { let nofix_groups = ['###_ch_tamedia', '###_fi_alma_talent', '###_it_citynews', '###_nl_vmnmedia', '###_substack_custom', '###_uk_delinian']; if (!custom_flex_domains.includes(custom_domain)) { - custom_flex[group] = custom_flex[group] ? custom_flex[group].push(custom_domain) : [custom_domain]; + if (custom_flex[group]) + custom_flex[group].push(custom_domain); + else + custom_flex[group] = [custom_domain]; custom_flex_domains.push(custom_domain); if (enabledSites.includes(group)) { if (!enabledSites.includes(custom_domain)) diff --git a/changelog.txt b/changelog.txt index a252630..2302a86 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 +Update popup (fix toggle for custom flex sites) * v3.4.3.0 (2023-11-19) Add Doorbraak.be diff --git a/contentScript.js b/contentScript.js index 464a994..5a11d06 100644 --- a/contentScript.js +++ b/contentScript.js @@ -2500,9 +2500,9 @@ else if (matchDomain(['lc.nl', 'dvhn.nl']) || document.querySelector('head > lin let paywall = document.querySelector('div.signupPlus, div.pw-wrapper'); if (paywall && dompurify_loaded) { let intro = document.querySelector('div.startPayWall'); - removeDOMElement(paywall, intro); let html = document.documentElement.outerHTML; if (html.includes('window.__NUXT__=')) { + removeDOMElement(paywall, intro); try { let json = html.split('window.__NUXT__=')[1].split('')[0].trim(); let url_nuxt = json.includes(',canonical:"') ? json.split(',canonical:"')[1].match(/\d+\.(html|ece)/)[0] : false; diff --git a/custom/manifest.json b/custom/manifest.json index b19c75b..a79badf 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.4.3.0" + "version": "3.4.3.1" } diff --git a/manifest.json b/manifest.json index ff1f0b9..536a3e3 100644 --- a/manifest.json +++ b/manifest.json @@ -815,5 +815,5 @@ "*://*.wyleex.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.4.3.0" + "version": "3.4.3.1" }