diff --git a/README.md b/README.md index f1e6d7a..d0b7386 100644 --- a/README.md +++ b/README.md @@ -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) - [Western Advocate](https://www.westernadvocate.com.au) -#### > Australian Provincial Newspapers (all) -For example: +#### > Australian Provincial Newspapers [Bundaberg News Mail](https://www.news-mail.com.au) - [Fraser Coast Chronicle](https://www.frasercoastchronicle.com.au) - [Gladstone Observer](https://www.gladstoneobserver.com.au) - diff --git a/background.js b/background.js index 2dbf7fa..fd4813a 100644 --- a/background.js +++ b/background.js @@ -340,6 +340,7 @@ ext_api.storage.sync.get({ enabledSites = enabledSites.concat(au_prov_news_domains); for (let domain of au_prov_news_domains) { allow_cookies.push(domain); + use_google_bot.push(domain); } } else 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 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/')); - 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; } @@ -680,7 +680,7 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { if (tabId !== -1) { 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, { file: 'contentScript.js', runAt: 'document_start' diff --git a/changelog.txt b/changelog.txt index 78aa628..59619c2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,9 +6,10 @@ Add Foreign Affairs Add Il Resto del Carlino (Italy) Add The Logic (Canada) 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 bug in NY Times (hidden iframe-content) +Fix-update The West Australian (timing) * v1.9.1.1 (2020-10-19) Hotfix remove cookies (www) diff --git a/contentScript.js b/contentScript.js index 43dcd84..14d1cd5 100644 --- a/contentScript.js +++ b/contentScript.js @@ -12,27 +12,14 @@ if (!matchDomain(arr_localstorage_hold)){ ext_api.runtime.onMessage.addListener(function (message, sender) { // setCookie opt-in if (message.optIn) { - 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); - } - + 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 (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); - } + } else if (domain = matchDomain(['independent.ie', 'belfasttelegraph.co.uk'])) { + if (!cookieExists('subscriber')) { + setCookie('subscriber', '{"subscriptionStatus": true}', domain, '/', 14); } } } diff --git a/manifest.json b/manifest.json index 6586d5b..58da289 100644 --- a/manifest.json +++ b/manifest.json @@ -333,5 +333,5 @@ "webRequest", "webRequestBlocking" ], - "version": "1.9.1.5" + "version": "1.9.1.6" } \ No newline at end of file diff --git a/optin/opt-in.html b/optin/opt-in.html index 04f71ef..21a6919 100644 --- a/optin/opt-in.html +++ b/optin/opt-in.html @@ -13,7 +13,6 @@

Bypass Paywalls Clean
- setCookie/custom sites opt-in

setCookie opt-in

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):

- Australian Provincial Newspapers
Boston Globe
Irish Independent
The Belfast Telegraph

diff --git a/sites.js b/sites.js index 18be404..c431a49 100644 --- a/sites.js +++ b/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) (opt-in)": "###_au_prov_news", + "Australian Provincial Newspapers (daily)": "###_au_prov_news", "Baltimore Sun": "baltimoresun.com", "Barron's": "barrons.com", "BBC History Extra": "historyextra.com",