mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-11-10 05:17:46 +01:00
Fix-update Australian Provincial Newspapers
This commit is contained in:
parent
8766accece
commit
8bdd8e1634
7 changed files with 26 additions and 13 deletions
|
@ -269,7 +269,8 @@ So don't update to Firefox 79 or use Firefox Nightly (and load BPC from a custom
|
|||
[The Standard](https://www.standard.net.au) -
|
||||
[Western Advocate](https://www.westernadvocate.com.au)
|
||||
|
||||
#### > Australian Provincial Newspapers (daily, grouped in options)
|
||||
#### > Australian Provincial Newspapers (all, grouped in options)
|
||||
For example:
|
||||
[Bundaberg News Mail](https://www.news-mail.com.au) -
|
||||
[Fraser Coast Chronicle](https://www.frasercoastchronicle.com.au) -
|
||||
[Gladstone Observer](https://www.gladstoneobserver.com.au) -
|
||||
|
|
|
@ -665,9 +665,10 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
|||
let inkl_site = (matchUrlDomain('cdn.jsdelivr.net', details.url) && matchUrlDomain('inkl.com', header_referer) && isSiteEnabled({url: header_referer}));
|
||||
let bloomberg_site = (matchUrlDomain('assets.bwbx.io', details.url) && matchUrlDomain('bloomberg.com', header_referer) && isSiteEnabled({url: header_referer}));
|
||||
let au_nc_amp_site = (matchUrlDomain('cdn.ampproject.org', details.url) && matchUrlDomain(au_news_corp_domains, header_referer) && isSiteEnabled({url: header_referer}));
|
||||
let au_apn_site = (header_referer && (urlHost(header_referer).endsWith('com.au') || urlHost(header_referer).endsWith('net.au')) && details.url.includes('https://media.apnarm.net.au/'));
|
||||
let au_swm_site = (header_referer && urlHost(header_referer).endsWith('com.au') && details.url.includes('https://s.thewest.com.au/'));
|
||||
let sz_amp_site = (matchUrlDomain('cdn.ampproject.org', details.url) && matchUrlDomain('sueddeutsche.de', header_referer) && isSiteEnabled({url: header_referer}));
|
||||
if (!isSiteEnabled(details) && !inkl_site && !bloomberg_site && !au_nc_amp_site && !au_swm_site && !sz_amp_site) {
|
||||
if (!isSiteEnabled(details) && !inkl_site && !bloomberg_site && !au_nc_amp_site && !au_apn_site && !au_swm_site && !sz_amp_site) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -749,7 +750,7 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
|||
|
||||
if (tabId !== -1) {
|
||||
ext_api.tabs.get(tabId, function (currentTab) {
|
||||
if ((currentTab && isSiteEnabled(currentTab)) || medium_custom_domain || au_swm_site || sz_amp_site) {
|
||||
if ((currentTab && isSiteEnabled(currentTab)) || medium_custom_domain || au_apn_site || au_swm_site || sz_amp_site) {
|
||||
ext_api.tabs.executeScript(tabId, {
|
||||
file: 'contentScript.js',
|
||||
runAt: 'document_start'
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
Changelog Bypass Paywalls Clean - Firefox
|
||||
|
||||
Post-release
|
||||
Fix-update Australian Provincial Newspapers
|
||||
Fix-update Haaretz/TheMarker (Bingbot)
|
||||
Fix-update Telegraph.co.uk (overlay)
|
||||
Fix Chrome-icon for dark/incognito mode (all permitted sites)
|
||||
|
|
|
@ -12,14 +12,23 @@ if (!matchDomain(arr_localstorage_hold)){
|
|||
ext_api.runtime.onMessage.addListener(function (message, sender) {
|
||||
// setCookie opt-in
|
||||
if (message.optIn) {
|
||||
if (matchDomain('bostonglobe.com')) {
|
||||
if (!cookieExists('s_fid')) {
|
||||
let s_fid = genHexString(16) + '-' + genHexString(16);
|
||||
setCookie('s_fid', s_fid, 'bostonglobe.com', '/', 14);
|
||||
}
|
||||
} else if (domain = matchDomain(['independent.ie', 'belfasttelegraph.co.uk'])) {
|
||||
if (!cookieExists('subscriber')) {
|
||||
setCookie('subscriber', '{"subscriptionStatus": true}', domain, '/', 14);
|
||||
let hostname = window.location.hostname;
|
||||
if (hostname.endsWith(".com.au") || hostname.endsWith(".net.au")) {
|
||||
// Australian Provincial Newspapers
|
||||
domain = window.location.hostname.replace('www.', '');
|
||||
let au_apn_script = document.querySelector('script[src^="https://media.apnarm.net.au/"]');
|
||||
if (au_apn_script || (domain = matchDomain(['news-mail.com.au', 'frasercoastchronicle.com.au', 'gladstoneobserver.com.au', 'dailyexaminer.com.au', 'dailymercury.com.au', 'themorningbulletin.com.au', 'sunshinecoastdaily.com.au', 'gympietimes.com.au', 'northernstar.com.au', 'qt.com.au', 'thechronicle.com.au', 'warwickdailynews.com.au'])))
|
||||
if (!cookieExists('subscribed'))
|
||||
setCookie('subscribed', 'true', domain, '/', 14);
|
||||
} else {
|
||||
if (matchDomain('bostonglobe.com')) {
|
||||
if (!cookieExists('s_fid')) {
|
||||
let s_fid = genHexString(16) + '-' + genHexString(16);
|
||||
setCookie('s_fid', s_fid, 'bostonglobe.com', '/', 14);
|
||||
}
|
||||
} else if (domain = matchDomain(['independent.ie', 'belfasttelegraph.co.uk'])) {
|
||||
if (!cookieExists('subscriber'))
|
||||
setCookie('subscriber', '{"subscriptionStatus": true}', domain, '/', 14);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -339,5 +339,5 @@
|
|||
"webRequest",
|
||||
"webRequestBlocking"
|
||||
],
|
||||
"version": "1.9.3.2"
|
||||
"version": "1.9.3.3"
|
||||
}
|
|
@ -13,6 +13,7 @@
|
|||
<p><strong>Bypass Paywalls Clean<br> - setCookie/custom sites opt-in</strong></p>
|
||||
<p><strong>setCookie opt-in</strong></p>
|
||||
<p>For some sites (check list in options) a necessary cookie has to be set (this cookie doesn't contain any personal information about the user or device):<br><br>
|
||||
Australian Provincial Newspapers<br/>
|
||||
Boston Globe<br>
|
||||
Irish Independent<br>
|
||||
The Belfast Telegraph</p>
|
||||
|
|
2
sites.js
2
sites.js
|
@ -9,7 +9,7 @@ var defaultSites =
|
|||
"Atavist Magazine": "atavist.com",
|
||||
"Australia News Corp": "###_au_news_corp",
|
||||
"Australian Community Media (daily)": "###_au_comm_media",
|
||||
"Australian Provincial Newspapers (daily)": "###_au_prov_news",
|
||||
"Australian Provincial Newspapers (daily) (opt-in)": "###_au_prov_news",
|
||||
"Baltimore Sun": "baltimoresun.com",
|
||||
"Barron's": "barrons.com",
|
||||
"BBC History Extra": "historyextra.com",
|
||||
|
|
Loading…
Reference in a new issue