Fix-update Australian Provincial Newspapers (Gb)

This commit is contained in:
magnolia1234 2020-10-22 17:11:21 +02:00
parent b5588da005
commit f6fdb10bda
7 changed files with 15 additions and 29 deletions

View file

@ -265,8 +265,7 @@ So don't update to Firefox 79 or use Firefox Nightly (and load BPC from a custom
[The Standard](https://www.standard.net.au) - [The Standard](https://www.standard.net.au) -
[Western Advocate](https://www.westernadvocate.com.au) [Western Advocate](https://www.westernadvocate.com.au)
#### > Australian Provincial Newspapers (all) #### > Australian Provincial Newspapers
For example:
[Bundaberg News Mail](https://www.news-mail.com.au) - [Bundaberg News Mail](https://www.news-mail.com.au) -
[Fraser Coast Chronicle](https://www.frasercoastchronicle.com.au) - [Fraser Coast Chronicle](https://www.frasercoastchronicle.com.au) -
[Gladstone Observer](https://www.gladstoneobserver.com.au) - [Gladstone Observer](https://www.gladstoneobserver.com.au) -

View file

@ -340,6 +340,7 @@ ext_api.storage.sync.get({
enabledSites = enabledSites.concat(au_prov_news_domains); enabledSites = enabledSites.concat(au_prov_news_domains);
for (let domain of au_prov_news_domains) { for (let domain of au_prov_news_domains) {
allow_cookies.push(domain); allow_cookies.push(domain);
use_google_bot.push(domain);
} }
} else } else
disabledSites = disabledSites.concat(au_prov_news_domains); disabledSites = disabledSites.concat(au_prov_news_domains);
@ -604,9 +605,8 @@ 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 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 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_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 au_swm_site = (header_referer && urlHost(header_referer).endsWith('com.au') && details.url.includes('https://s.thewest.com.au/'));
if (!isSiteEnabled(details) && !(inkl_site) && !(bloomberg_site) && !(au_nc_amp_site) && !(au_apn_site) && !(au_swm_site)) { if (!isSiteEnabled(details) && !(inkl_site) && !(bloomberg_site) && !(au_nc_amp_site) && !(au_swm_site)) {
return; return;
} }
@ -680,7 +680,7 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
if (tabId !== -1) { if (tabId !== -1) {
ext_api.tabs.get(tabId, function (currentTab) { ext_api.tabs.get(tabId, function (currentTab) {
if (isSiteEnabled(currentTab) || medium_custom_domain || au_apn_site || au_swm_site) { if (isSiteEnabled(currentTab) || medium_custom_domain || au_swm_site) {
ext_api.tabs.executeScript(tabId, { ext_api.tabs.executeScript(tabId, {
file: 'contentScript.js', file: 'contentScript.js',
runAt: 'document_start' runAt: 'document_start'

View file

@ -6,9 +6,10 @@ Add Foreign Affairs
Add Il Resto del Carlino (Italy) Add Il Resto del Carlino (Italy)
Add The Logic (Canada) Add The Logic (Canada)
Add The New York Review of Books Add The New York Review of Books
Fix-update The West Australian (timing) Fix-update Australian Provincial Newspapers (Googlebot)
Fix-update Funke Medien (TinyPass) Fix-update Funke Medien (TinyPass)
Fix bug in NY Times (hidden iframe-content) Fix bug in NY Times (hidden iframe-content)
Fix-update The West Australian (timing)
* v1.9.1.1 (2020-10-19) * v1.9.1.1 (2020-10-19)
Hotfix remove cookies (www) Hotfix remove cookies (www)

View file

@ -12,27 +12,14 @@ if (!matchDomain(arr_localstorage_hold)){
ext_api.runtime.onMessage.addListener(function (message, sender) { ext_api.runtime.onMessage.addListener(function (message, sender) {
// setCookie opt-in // setCookie opt-in
if (message.optIn) { if (message.optIn) {
let hostname = window.location.hostname; if (matchDomain('bostonglobe.com')) {
if (hostname.endsWith(".com.au") || hostname.endsWith(".net.au")) { if (!cookieExists('s_fid')) {
// Australian Provincial Newspapers let s_fid = genHexString(16) + '-' + genHexString(16);
domain = window.location.hostname.replace('www.', ''); setCookie('s_fid', s_fid, 'bostonglobe.com', '/', 14);
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 { } else if (domain = matchDomain(['independent.ie', 'belfasttelegraph.co.uk'])) {
if (matchDomain('bostonglobe.com')) { if (!cookieExists('subscriber')) {
if (!cookieExists('s_fid')) { setCookie('subscriber', '{"subscriptionStatus": true}', domain, '/', 14);
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);
}
} }
} }
} }

View file

@ -333,5 +333,5 @@
"webRequest", "webRequest",
"webRequestBlocking" "webRequestBlocking"
], ],
"version": "1.9.1.5" "version": "1.9.1.6"
} }

View file

@ -13,7 +13,6 @@
<p><strong>Bypass Paywalls Clean<br> - setCookie/custom sites opt-in</strong></p> <p><strong>Bypass Paywalls Clean<br> - setCookie/custom sites opt-in</strong></p>
<p><strong>setCookie 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> <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> Boston Globe<br>
Irish Independent<br> Irish Independent<br>
The Belfast Telegraph</p> The Belfast Telegraph</p>

View file

@ -9,7 +9,7 @@ var defaultSites =
"Atavist Magazine": "atavist.com", "Atavist Magazine": "atavist.com",
"Australia News Corp": "###_au_news_corp", "Australia News Corp": "###_au_news_corp",
"Australian Community Media (daily)": "###_au_comm_media", "Australian Community Media (daily)": "###_au_comm_media",
"Australian Provincial Newspapers (daily) (opt-in)": "###_au_prov_news", "Australian Provincial Newspapers (daily)": "###_au_prov_news",
"Baltimore Sun": "baltimoresun.com", "Baltimore Sun": "baltimoresun.com",
"Barron's": "barrons.com", "Barron's": "barrons.com",
"BBC History Extra": "historyextra.com", "BBC History Extra": "historyextra.com",