Release v2.9.2.0

merge-requests/10/head v2.9.2.0
magnolia1234 2 years ago
parent 5256302919
commit ba6db7ec56

@ -726,31 +726,32 @@ if (typeof browser !== 'object') {
ext_api.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
if (changeInfo.status === 'complete' && /^http/.test(tab.url) && matchUrlDomain(enabledSites, tab.url)) {
let url = tab.url;
let rc_domain = matchUrlDomain(remove_cookies, url);
let rc_domain_enabled = rc_domain && enabledSites.includes(rc_domain);
let lib_file = 'lib/empty.js';
if (matchUrlDomain(dompurify_sites, url))
lib_file = 'lib/purify.min.js';
var bg2csData = {
optin_setcookie: optin_setcookie,
amp_unhide: matchUrlDomain(amp_unhide, url)
};
let amp_redirect_domain = '';
if (amp_redirect_domain = matchUrlDomain(Object.keys(amp_redirect), url))
bg2csData.amp_redirect = amp_redirect[amp_redirect_domain];
let cs_code_domain = '';
if (cs_code_domain = matchUrlDomain(Object.keys(cs_code), url))
bg2csData.cs_code = cs_code[cs_code_domain];
let ld_json_domain = '';
if (ld_json_domain = matchUrlDomain(Object.keys(ld_json), url))
bg2csData.ld_json = ld_json[ld_json_domain];
let ld_google_webcache_domain = '';
if (ld_google_webcache_domain = matchUrlDomain(Object.keys(ld_google_webcache), url))
bg2csData.ld_google_webcache = ld_google_webcache[ld_google_webcache_domain];
let tab_runs = 5;
for (let n = 0; n < tab_runs; n++) {
let url = tab.url;
let rc_domain = matchUrlDomain(remove_cookies, url);
let rc_domain_enabled = rc_domain && enabledSites.includes(rc_domain);
let lib_file = 'lib/empty.js';
if (matchUrlDomain(dompurify_sites, url))
lib_file = 'lib/purify.min.js';
var bg2csData = {
optin_setcookie: optin_setcookie,
amp_unhide: matchUrlDomain(amp_unhide, url)
};
let amp_redirect_domain = '';
if (amp_redirect_domain = matchUrlDomain(Object.keys(amp_redirect), url))
bg2csData.amp_redirect = amp_redirect[amp_redirect_domain];
let cs_code_domain = '';
if (cs_code_domain = matchUrlDomain(Object.keys(cs_code), url))
bg2csData.cs_code = cs_code[cs_code_domain];
let ld_json_domain = '';
if (ld_json_domain = matchUrlDomain(Object.keys(ld_json), url))
bg2csData.ld_json = ld_json[ld_json_domain];
let ld_google_webcache_domain = '';
if (ld_google_webcache_domain = matchUrlDomain(Object.keys(ld_google_webcache), url))
bg2csData.ld_google_webcache = ld_google_webcache[ld_google_webcache_domain];
setTimeout(function () {
// run contentScript.js on page
ext_api.tabs.executeScript(tabId, {
code: 'var bg2csData = ' + JSON.stringify(bg2csData) + ';'
}, function () {
@ -768,12 +769,26 @@ ext_api.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
})
});
});
// remove cookies after page load
if (rc_domain_enabled) {
remove_cookies_fn(rc_domain, true);
}
}, n * 1000 / tab_runs);
}
}
if (changeInfo.status === 'complete') {
// load toggleIcon.js (icon for dark or incognito mode in Chrome))
if (typeof browser !== 'object') {
ext_api.tabs.executeScript(tabId, {
file: 'options/toggleIcon.js',
runAt: 'document_start'
}, function (res) {
if (ext_api.runtime.lastError || res[0]) {
return;
}
});
}
}
});
setInterval(function () {
@ -1010,25 +1025,6 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
}
}
// load toggleIcon.js (icon for dark or incognito mode in Chrome))
if (typeof browser !== 'object' && ['main_frame', 'xmlhttprequest'].includes(details.type)) {
ext_api.tabs.query({
active: true,
currentWindow: true
}, function (tabs) {
if (tabs && tabs[0] && tabs[0].url && tabs[0].url.startsWith('http')) {
ext_api.tabs.executeScript({
file: 'options/toggleIcon.js',
runAt: 'document_start'
}, function (res) {
if (ext_api.runtime.lastError || res[0]) {
return;
}
});
}
});
}
if (!isSiteEnabled(details)) {
return;
}

@ -2,6 +2,8 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
* v2.9.2.0 (2022-11-06)
Add Mediapart.fr
Add The New York Sun
Update block general paywall script (fix Zephr-local & config sites.js)

@ -57,8 +57,8 @@
"*://*.aachener-zeitung.de/*",
"*://*.abc.es/*",
"*://*.abendblatt.de/*",
"*://*.abril.com.br/*",
"*://*.abqjournal.com/*",
"*://*.abril.com.br/*",
"*://*.adage.com/*",
"*://*.adelaidenow.com.au/*",
"*://*.adweek.com/*",
@ -355,7 +355,6 @@
"*://*.lavozdigital.es/*",
"*://*.law.com/*",
"*://*.law360.com/*",
"*://*.law360news.com/*",
"*://*.lc.nl/*",
"*://*.lecho.be/*",
"*://*.ledauphine.com/*",
@ -369,7 +368,6 @@
"*://*.leprogres.fr/*",
"*://*.lequipe.fr/*",
"*://*.lescienze.it/*",
"*://*.lesechos.com/*",
"*://*.lesechos.fr/*",
"*://*.lesinrocks.com/*",
"*://*.lesoir.be/*",
@ -702,8 +700,8 @@
"*://*.flip-pay.com/*",
"*://*.funkedigital.de/*",
"*://*.gannett-cdn.com/*",
"*://*.hadrianpaywall.com/*",
"*://*.gitlab.com/magnolia1234/*",
"*://*.hadrianpaywall.com/*",
"*://*.hearstnp.com/*",
"*://*.loader-cdn.azureedge.net/*",
"*://*.mcclatchy.com/*",
@ -714,12 +712,12 @@
"*://*.pasedigital.cl/*",
"*://*.postmedia.digital/*",
"*://*.rndtech.de/*",
"*://*.substackcdn.com/*",
"*://*.soy-chile.cl/*",
"*://*.static-chmedia.ch/*",
"*://*.substackcdn.com/*",
"*://*.wallkit.net/*",
"*://gcm.omerlocdn.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "2.9.1.7"
"version": "2.9.2.0"
}

@ -59,17 +59,17 @@ function renderOptions() {
var site_types = {
"updated": {
sites: sites_updated,
title: '* Updated (new) Sites (opt-in to custom sites)',
title: '* Updated (new) sites (opt-in to custom sites)',
default_sites: false
},
"default": {
sites: defaultSites,
title: '* Default Sites',
title: '* Default sites',
default_sites: true
},
"custom": {
sites: sites_custom,
title: '* Custom (new) Sites',
title: '* Custom (new) sites',
default_sites: false
}
};

@ -21,9 +21,10 @@
<a href="https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean" target="_blank">Help</a> |
<a href="https://twitter.com/Magnolia1234B" target="_blank">Twitter</a></div>
<div><a href="https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/raw/master/changelog.txt" target="_blank">Changelog</a> |
<button id="clear_cookies" title="clear cookies (and local storage) for current site">clear cookies</button> |
<button id="clear_cookies" title="clear cookies (and local storage) for current site">clear cookies *</button> |
<button id="button-close" title="close popup">close</button></div>
<div><span id="version_new"></span></div>
<div><span>* for unlisted sites: first clear cookies (X = no fix) & block general paywall-scripts (in options) or use custom sites/reader view</span></div>
<div><span id="archive"></span></div>
<script id="popup" src="version.js"></script>
<script src="popup.js"></script>

@ -600,7 +600,7 @@ var defaultSites = {
allow_cookies: 1,
block_regex: /crain-platform-.+-prod\.s3\.amazonaws\.com\/s3fs-public\/js\/js_.+\.js/
},
"Glassdoor": {
"Glassdoor (regwall)": {
domain: "glassdoor.com"
},
"Globes": {
@ -2128,7 +2128,7 @@ var defaultSites = {
group_rule_domains: ["brisbanetimes.com.au", "smh.com.au", "theage.com.au", "watoday.com.au"],
block_regex: /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/
},
"* Block Paywall-scripts (opt-in to custom sites to enable also for unlisted sites)": {
"* Block general paywall-scripts (opt-in to custom sites to enable also for unlisted sites)": {
domain: "###"
},
"Amp-access": {

@ -2,8 +2,8 @@
"addons": {
"magnolia@12.34": {
"updates": [
{ "version": "2.9.1.0",
"update_link": "https://gitlab.com/magnolia1234/bpc-uploads/-/raw/master/bypass_paywalls_clean-2.9.1.0.xpi" }
{ "version": "2.9.2.0",
"update_link": "https://gitlab.com/magnolia1234/bpc-uploads/-/raw/master/bypass_paywalls_clean-2.9.2.0.xpi" }
]
}
}

Loading…
Cancel
Save