Remove Australian Provincial Newspapers (obsolete)
This commit is contained in:
parent
425cd6c367
commit
697d0eedce
13
README.md
13
README.md
@ -579,18 +579,7 @@ Grouped in options:\
|
||||
[The Northern Daily Leader](https://www.northerndailyleader.com.au) -
|
||||
[The Port Macquarie News](https://www.portnews.com.au) -
|
||||
[The Standard](https://www.standard.net.au) -
|
||||
[Western Advocate](https://www.westernadvocate.com.au)\
|
||||
*Australian Provincial Newspapers* site like (opt-in to custom sites for unlisted)\
|
||||
[Bundaberg News Mail](https://www.news-mail.com.au) -
|
||||
[Fraser Coast Chronicle](https://www.frasercoastchronicle.com.au) -
|
||||
[Gladstone Observer](https://www.gladstoneobserver.com.au) -
|
||||
[Grafton Daily Examiner](https://www.dailyexaminer.com.au) -
|
||||
[Mackay Daily Mercury](https://www.dailymercury.com.au) -
|
||||
[Rockhampton Morning Bulletin](https://www.themorningbulletin.com.au) -
|
||||
[Sunshine Coast Daily](https://www.sunshinecoastdaily.com.au) -
|
||||
[The Gympie Times](https://www.gympietimes.com.au) -
|
||||
[The Queensland Times](https://www.qt.com.au) -
|
||||
[Warwick Daily News](https://www.warwickdailynews.com.au)
|
||||
[Western Advocate](https://www.westernadvocate.com.au)
|
||||
|
||||
#### East Asia
|
||||
[Asia Times](https://asiatimes.com) -
|
||||
|
@ -9,6 +9,7 @@ var ext_version = manifestData.version;
|
||||
const cs_limit_except = ['elespanol.com', 'faz.net', 'inkl.com', 'la-croix.com', 'nation.africa', 'nationalgeographic.com'];
|
||||
var currentTabUrl = '';
|
||||
var csDone = false;
|
||||
var optin_setcookie = false;
|
||||
|
||||
// Cookies from this list are blocked by default (obsolete)
|
||||
// defaultSites are loaded from sites.js at installation extension
|
||||
@ -458,7 +459,6 @@ function setDefaultOptions() {
|
||||
var grouped_sites = {
|
||||
'###_au_comm_media': au_comm_media_domains,
|
||||
'###_au_news_corp': au_news_corp_domains,
|
||||
'###_au_prov_news': au_prov_news_domains,
|
||||
'###_br_folha': br_folha_domains,
|
||||
'###_ca_torstar': ca_torstar_domains,
|
||||
'###_de_funke_medien': de_funke_media_domains,
|
||||
@ -514,10 +514,6 @@ function add_grouped_sites(init_rules) {
|
||||
use_google_bot.push(domain);
|
||||
blockedRegexes[domain] = /cdn\.ampproject\.org\/v\d\/amp-(access|ad|iframe)-.+\.js/;
|
||||
}
|
||||
for (let domain of au_prov_news_domains) {
|
||||
allow_cookies.push(domain);
|
||||
use_google_bot.push(domain);
|
||||
}
|
||||
for (let domain of br_folha_domains) {
|
||||
allow_cookies.push(domain);
|
||||
blockedRegexes[domain] = /(\.folha\.uol\.com\.br\/paywall\/js\/.+\/publicidade\.ads\.js|paywall\.folha\.uol\.com\.br\/|js\.matheranalytics\.com\/)/;
|
||||
@ -664,12 +660,14 @@ ext_api.storage.local.get({
|
||||
sites_default: Object.keys(defaultSites).filter(x => !defaultSites[x].match(/^(#options_|###$)/)),
|
||||
sites_custom: {},
|
||||
sites_excluded: [],
|
||||
ext_version_old: '2.3.9.0'
|
||||
ext_version_old: '2.3.9.0',
|
||||
optIn: false
|
||||
}, function (items) {
|
||||
var sites = items.sites;
|
||||
var sites_default = items.sites_default;
|
||||
var sites_custom = items.sites_custom;
|
||||
var ext_version_old = items.ext_version_old
|
||||
var ext_version_old = items.ext_version_old;
|
||||
optin_setcookie = items.optIn;
|
||||
excludedSites = items.sites_excluded;
|
||||
|
||||
enabledSites = Object.keys(sites).filter(function (key) {
|
||||
@ -886,6 +884,9 @@ ext_api.storage.onChanged.addListener(function (changes, namespace) {
|
||||
if (key === 'ext_version_new') {
|
||||
ext_version_new = storageChange.newValue;
|
||||
}
|
||||
if (key === 'optIn') {
|
||||
optin_setcookie = storageChange.newValue;
|
||||
}
|
||||
// reset disableJavascriptOnListedSites eventListener
|
||||
ext_api.webRequest.onBeforeRequest.removeListener(disableJavascriptOnListedSites);
|
||||
ext_api.webRequest.handlerBehaviorChanged();
|
||||
@ -1258,7 +1259,6 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
||||
|
||||
let allow_ext_source = medium_custom_domain;
|
||||
let bpc_amp_site = false;
|
||||
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({url: header_referer})) {
|
||||
@ -1275,7 +1275,7 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) {
|
||||
bpc_amp_site = (matchUrlDomain('cdn.ampproject.org', details.url) && matchUrlDomain(['aachener-zeitung.de', 'asiatimes.com', 'augsburger-allgemeine.de', 'barrons.com', 'belfasttelegraph.co.uk', 'cicero.de', 'cmjornal.pt', 'elpais.com', 'elperiodico.com', 'freiepresse.de', 'handelsblatt.com', 'ilfattoquotidiano.it', 'inc42.com', 'independent.ie', 'irishtimes.com', 'la-croix.com', 'marketwatch.com', 'nationalreview.com', 'noz.de', 'nwzonline.de', 'scmp.com', 'seekingalpha.com', 'shz.de', 'staradvertiser.com', 'sueddeutsche.de', 'svz.de', 'telegraph.co.uk', 'washingtonpost.com', 'westfalen-blatt.de', 'wn.de', 'wsj.com'].concat(au_news_corp_domains, au_nine_domains, de_madsack_domains, es_epiberica_domains, es_grupo_vocento_domains, es_unidad_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, it_repubblica_domains, usa_mcc_domains, usa_mng_domains, usa_theathletic_domains), header_referer));
|
||||
}
|
||||
|
||||
if (!isSiteEnabled(details) && !allow_ext_source && !bpc_amp_site && !au_apn_site && !au_swm_site) {
|
||||
if (!isSiteEnabled(details) && !allow_ext_source && !bpc_amp_site && !au_swm_site) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1374,7 +1374,7 @@ if (matchUrlDomain(change_headers, details.url) && (!['font', 'image', 'styleshe
|
||||
|
||||
if (tabId !== -1) {
|
||||
ext_api.tabs.get(tabId, function (currentTab) {
|
||||
if ((currentTab && isSiteEnabled(currentTab)) || medium_custom_domain || au_apn_site || au_swm_site) {
|
||||
if ((currentTab && isSiteEnabled(currentTab)) || medium_custom_domain || au_swm_site) {
|
||||
if (currentTab.url !== currentTabUrl) {
|
||||
csDone = false;
|
||||
currentTabUrl = currentTab.url;
|
||||
@ -1383,19 +1383,26 @@ if (matchUrlDomain(change_headers, details.url) && (!['font', 'image', 'styleshe
|
||||
let lib_file = 'lib/empty.js';
|
||||
if (matchUrlDomain(['bloomberg.com', 'cicero.de', 'economictimes.com', 'lesechos.fr', 'newleftreview.org', 'newyorker.com', 'nzherald.co.nz', 'prospectmagazine.co.uk', 'sudouest.fr', 'techinasia.com', 'valor.globo.com', 'washingtonpost.com'].concat(nl_mediahuis_region_domains, no_nhst_media_domains, usa_theathletic_domains), currentTabUrl))
|
||||
lib_file = 'lib/purify.min.js';
|
||||
ext_api.tabs.executeScript(tabId, {
|
||||
file: lib_file,
|
||||
runAt: 'document_start'
|
||||
}, function () {
|
||||
var bg2csData = {
|
||||
optin_setcookie: optin_setcookie
|
||||
};
|
||||
ext_api.tabs.executeScript(tabId, {
|
||||
file: 'contentScript.js',
|
||||
runAt: 'document_start'
|
||||
}, function (res) {
|
||||
if (ext_api.runtime.lastError || res[0]) {
|
||||
return;
|
||||
}
|
||||
})
|
||||
});
|
||||
code: 'var bg2csData = ' + JSON.stringify(bg2csData) + ';'
|
||||
}, function () {
|
||||
ext_api.tabs.executeScript(tabId, {
|
||||
file: lib_file,
|
||||
runAt: 'document_start'
|
||||
}, function () {
|
||||
ext_api.tabs.executeScript(tabId, {
|
||||
file: 'contentScript.js',
|
||||
runAt: 'document_start'
|
||||
}, function (res) {
|
||||
if (ext_api.runtime.lastError || res[0]) {
|
||||
return;
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -1622,16 +1629,6 @@ function clear_cookies() {
|
||||
|
||||
var chrome_scheme = 'light';
|
||||
ext_api.runtime.onMessage.addListener(function (message, sender) {
|
||||
// check storage for opt in
|
||||
if (message.request === 'optin') {
|
||||
ext_api.storage.local.get("optIn", function (result) {
|
||||
// send message back to content script with value of opt in
|
||||
ext_api.tabs.sendMessage(
|
||||
sender.tab.id, {
|
||||
"optIn": (true == result.optIn)
|
||||
});
|
||||
});
|
||||
}
|
||||
if (message.request === 'clear_cookies') {
|
||||
clear_cookies();
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Chrome
|
||||
|
||||
Post-release
|
||||
Add Westfaelische Nachrichten (Germany)
|
||||
Remove Australian Provincial Newspapers (obsolete)
|
||||
Fix GElocal.it
|
||||
Fix National Review
|
||||
Fix Ruhr Nachrichten (amp)
|
||||
|
@ -24,8 +24,7 @@ var usa_mng_domains = ['denverpost.com', 'eastbaytimes.com', 'mercurynews.com'
|
||||
var usa_tribune_domains = ['baltimoresun.com', 'chicagotribune.com', 'courant.com', 'dailypress.com', 'mcall.com', 'nydailynews.com', 'orlandosentinel.com', 'pilotonline.com', 'sun-sentinel.com'];
|
||||
|
||||
// clean local storage of sites (with an exemption for hold-list)
|
||||
var arr_localstorage_hold = ['augsburger-allgemeine.de', 'charliehebdo.fr', 'cmjornal.pt', 'houstonchronicle.com', 'inc42.com', 'irishtimes.com', 'kurier.at', 'nknews.org', 'seekingalpha.com', 'sfchronicle.com', 'thehindu.com', 'thetimes.co.uk'].concat(es_unidad_domains, no_nhst_media_domains);
|
||||
arr_localstorage_hold = arr_localstorage_hold.concat(de_funke_media_domains, es_grupo_vocento_domains);
|
||||
var arr_localstorage_hold = ['augsburger-allgemeine.de', 'charliehebdo.fr', 'cmjornal.pt', 'houstonchronicle.com', 'inc42.com', 'irishtimes.com', 'kurier.at', 'nknews.org', 'seekingalpha.com', 'sfchronicle.com', 'thehindu.com', 'thetimes.co.uk'].concat(de_funke_media_domains, es_grupo_vocento_domains, es_unidad_domains, no_nhst_media_domains);
|
||||
if (!matchDomain(arr_localstorage_hold)) {
|
||||
window.localStorage.clear();
|
||||
}
|
||||
@ -33,38 +32,12 @@ if (!matchDomain(arr_localstorage_hold)) {
|
||||
var div_bpc_done = document.querySelector('div#bpc_done');
|
||||
if (!div_bpc_done) {
|
||||
|
||||
// listen to responses from background script
|
||||
if (ext_api.runtime && (matchDomain(['belfasttelegraph.co.uk', 'independent.ie']) || window.location.hostname.match(/\.(com|net)\.au$/))) {
|
||||
ext_api.runtime.onMessage.addListener(function (message, sender) {
|
||||
// setCookie opt-in
|
||||
if (message.optIn) {
|
||||
let hostname = window.location.hostname;
|
||||
if (hostname.match(/\.(com|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', 'qt.com.au', 'warwickdailynews.com.au'])))
|
||||
if (!cookieExists('subscribed'))
|
||||
setCookie('subscribed', 'true', domain, '/', 14);
|
||||
} else {
|
||||
if (domain = matchDomain(['belfasttelegraph.co.uk', 'independent.ie'])) {
|
||||
if (!cookieExists('subscriber'))
|
||||
setCookie('subscriber', '{"subscriptionStatus": true}', domain, '/', 14);
|
||||
if (hostname.includes('amp.')) {
|
||||
let subscriber = document.querySelector('section[amp-access="subscriber"][amp-access-hide]');
|
||||
if (subscriber)
|
||||
subscriber.removeAttribute('amp-access-hide');
|
||||
let not_subscriber = document.querySelector('section[amp-access="NOT subscriber"]');
|
||||
let amp_ads = document.querySelectorAll('amp-ad, amp-embed');
|
||||
removeDOMElement(not_subscriber, ...amp_ads);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// ask for opt-in confirmation
|
||||
ext_api.runtime.sendMessage({request: 'optin'});
|
||||
// check for opt-in confirmation (from background.js)
|
||||
if (bg2csData.optin_setcookie) {
|
||||
if (domain = matchDomain(['belfasttelegraph.co.uk', 'independent.ie'])) {
|
||||
if (!cookieExists('subscriber'))
|
||||
setCookie('subscriber', '{"subscriptionStatus": true}', domain, '/', 14);
|
||||
}
|
||||
}
|
||||
|
||||
// Content workarounds/domain
|
||||
|
@ -39,5 +39,5 @@
|
||||
"webRequestBlocking",
|
||||
"<all_urls>"
|
||||
],
|
||||
"version": "2.3.9.6"
|
||||
"version": "2.3.9.7"
|
||||
}
|
@ -117,9 +117,7 @@
|
||||
"*://*.curbed.com/*",
|
||||
"*://*.cw.com.tw/*",
|
||||
"*://*.dailyadvertiser.com.au/*",
|
||||
"*://*.dailyexaminer.com.au/*",
|
||||
"*://*.dailyliberal.com.au/*",
|
||||
"*://*.dailymercury.com.au/*",
|
||||
"*://*.dailypress.com/*",
|
||||
"*://*.dailytelegraph.com.au/*",
|
||||
"*://*.dallasnews.com/*",
|
||||
@ -180,7 +178,6 @@
|
||||
"*://*.foreignaffairs.com/*",
|
||||
"*://*.foreignpolicy.com/*",
|
||||
"*://*.fortune.com/*",
|
||||
"*://*.frasercoastchronicle.com.au/*",
|
||||
"*://*.freiepresse.de/*",
|
||||
"*://*.fresnobee.com/*",
|
||||
"*://*.ft.com/*",
|
||||
@ -190,7 +187,6 @@
|
||||
"*://*.gelocal.it/*",
|
||||
"*://*.genomeweb.com/*",
|
||||
"*://*.gestion.pe/*",
|
||||
"*://*.gladstoneobserver.com.au/*",
|
||||
"*://*.glassdoor.com/*",
|
||||
"*://*.globes.co.il/*",
|
||||
"*://*.globo.com/*",
|
||||
@ -199,7 +195,6 @@
|
||||
"*://*.griffithreview.com/*",
|
||||
"*://*.groene.nl/*",
|
||||
"*://*.grubstreet.com/*",
|
||||
"*://*.gympietimes.com.au/*",
|
||||
"*://*.haaretz.co.il/*",
|
||||
"*://*.haaretz.com/*",
|
||||
"*://*.haarlemsdagblad.nl/*",
|
||||
@ -334,7 +329,6 @@
|
||||
"*://*.newcastleherald.com.au/*",
|
||||
"*://*.newleftreview.org/*",
|
||||
"*://*.newrepublic.com/*",
|
||||
"*://*.news-mail.com.au/*",
|
||||
"*://*.newsday.com/*",
|
||||
"*://*.newsobserver.com/*",
|
||||
"*://*.newstatesman.com/*",
|
||||
@ -380,7 +374,6 @@
|
||||
"*://*.precisiononcologynews.com/*",
|
||||
"*://*.prospectmagazine.co.uk/*",
|
||||
"*://*.pzc.nl/*",
|
||||
"*://*.qt.com.au/*",
|
||||
"*://*.quora.com/*",
|
||||
"*://*.quotidiano.net/*",
|
||||
"*://*.quotidianodipuglia.it/*",
|
||||
@ -427,7 +420,6 @@
|
||||
"*://*.sudouest.fr/*",
|
||||
"*://*.sueddeutsche.de/*",
|
||||
"*://*.sun-sentinel.com/*",
|
||||
"*://*.sunshinecoastdaily.com.au/*",
|
||||
"*://*.svz.de/*",
|
||||
"*://*.talouselama.fi/*",
|
||||
"*://*.tampabay.com/*",
|
||||
@ -459,7 +451,6 @@
|
||||
"*://*.themarker.com/*",
|
||||
"*://*.themarket.ch/*",
|
||||
"*://*.themercury.com.au/*",
|
||||
"*://*.themorningbulletin.com.au/*",
|
||||
"*://*.thenation.com/*",
|
||||
"*://*.thenewatlantis.com/*",
|
||||
"*://*.thepeterboroughexaminer.com/*",
|
||||
@ -501,7 +492,6 @@
|
||||
"*://*.volkskrant.nl/*",
|
||||
"*://*.vosgesmatin.fr/*",
|
||||
"*://*.vulture.com/*",
|
||||
"*://*.warwickdailynews.com.au/*",
|
||||
"*://*.washingtonpost.com/*",
|
||||
"*://*.watoday.com.au/*",
|
||||
"*://*.waz.de/*",
|
||||
@ -554,5 +544,5 @@
|
||||
"*://*.wallkit.net/*",
|
||||
"*://*.wsj.net/*"
|
||||
],
|
||||
"version": "2.3.9.6"
|
||||
"version": "2.3.9.7"
|
||||
}
|
@ -14,7 +14,6 @@
|
||||
<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/>
|
||||
Irish Independent<br>
|
||||
The Belfast Telegraph</p>
|
||||
<p>setCookie opt-in enabled: <span id="opt-in-enabled"></span></p>
|
||||
|
3
sites.js
3
sites.js
@ -328,7 +328,6 @@ var defaultSites =
|
||||
|
||||
const au_comm_media_domains = ['bendigoadvertiser.com.au', 'bordermail.com.au', 'canberratimes.com.au', 'centralwesterndaily.com.au', 'dailyadvertiser.com.au', 'dailyliberal.com.au', 'examiner.com.au', 'illawarramercury.com.au', 'newcastleherald.com.au', 'northerndailyleader.com.au', 'portnews.com.au', 'standard.net.au', 'theadvocate.com.au', 'thecourier.com.au', 'westernadvocate.com.au'];
|
||||
const au_news_corp_domains = ['adelaidenow.com.au', 'cairnspost.com.au', 'couriermail.com.au', 'dailytelegraph.com.au', 'geelongadvertiser.com.au', 'goldcoastbulletin.com.au', 'heraldsun.com.au', 'ntnews.com.au', 'theaustralian.com.au', 'thechronicle.com.au', 'themercury.com.au', 'townsvillebulletin.com.au', 'weeklytimesnow.com.au'];
|
||||
const au_prov_news_domains = ['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', 'qt.com.au', 'warwickdailynews.com.au'];
|
||||
const br_folha_domains = ['folha.uol.com.br', 'blogfolha.uol.com.br'];
|
||||
const ca_torstar_domains = ['niagarafallsreview.ca', 'stcatharinesstandard.ca', 'thepeterboroughexaminer.com', 'therecord.com', 'thespec.com', 'thestar.com', 'wellandtribune.ca'];
|
||||
const de_funke_media_domains = ['abendblatt.de', 'braunschweiger-zeitung.de', 'morgenpost.de', 'nrz.de', 'otz.de', 'thueringer-allgemeine.de', 'tlz.de', 'waz.de', 'wp.de', 'wr.de'];
|
||||
@ -358,4 +357,4 @@ const usa_tribune_domains = ['baltimoresun.com', 'chicagotribune.com', 'courant.
|
||||
const usa_theathletic_domains = ['theathletic.com', 'theathletic.co.uk'];
|
||||
|
||||
var defaultSites_grouped_domains = Object.values(defaultSites);
|
||||
var defaultSites_domains = defaultSites_grouped_domains.concat(au_comm_media_domains, au_news_corp_domains, au_prov_news_domains, br_folha_domains, ca_torstar_domains, de_funke_media_domains, de_madsack_domains, economictimes_domains, es_epiberica_domains, es_grupo_vocento_domains, fi_alma_talent_domains, fi_sanoma_domains, fr_be_groupe_rossel_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, it_ilmessaggero_domains, it_quotidiano_domains, nl_ad_region_domains, nl_mediahuis_region_domains, no_nhst_media_domains, timesofindia_domains, usa_craincomm_domains, usa_lee_ent_domains, usa_mcc_domains, usa_mng_domains, usa_nymag_domains, usa_tribune_domains, usa_theathletic_domains);
|
||||
var defaultSites_domains = defaultSites_grouped_domains.concat(au_comm_media_domains, au_news_corp_domains, br_folha_domains, ca_torstar_domains, de_funke_media_domains, de_madsack_domains, economictimes_domains, es_epiberica_domains, es_grupo_vocento_domains, fi_alma_talent_domains, fi_sanoma_domains, fr_be_groupe_rossel_domains, fr_groupe_ebra_domains, fr_groupe_la_depeche_domains, it_ilmessaggero_domains, it_quotidiano_domains, nl_ad_region_domains, nl_mediahuis_region_domains, no_nhst_media_domains, timesofindia_domains, usa_craincomm_domains, usa_lee_ent_domains, usa_mcc_domains, usa_mng_domains, usa_nymag_domains, usa_tribune_domains, usa_theathletic_domains);
|
||||
|
Loading…
x
Reference in New Issue
Block a user