|
|
|
@ -61,12 +61,9 @@ var allow_cookies = [
|
|
|
|
|
'the-american-interest.com',
|
|
|
|
|
'theathletic.co.uk',
|
|
|
|
|
'theathletic.com',
|
|
|
|
|
'theaustralian.com.au',
|
|
|
|
|
'themarker.com',
|
|
|
|
|
'themercury.com.au',
|
|
|
|
|
'trouw.nl',
|
|
|
|
|
'volkskrant.nl',
|
|
|
|
|
'weeklytimesnow.com.au',
|
|
|
|
|
'worldpoliticsreview.com',
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
@ -121,11 +118,8 @@ var use_google_bot_default = [
|
|
|
|
|
'switzersuperreport.com.au',
|
|
|
|
|
'theathletic.co.uk',
|
|
|
|
|
'theathletic.com',
|
|
|
|
|
'theaustralian.com.au',
|
|
|
|
|
'themarker.com',
|
|
|
|
|
'themercury.com.au',
|
|
|
|
|
'thetimes.co.uk',
|
|
|
|
|
'weeklytimesnow.com.au',
|
|
|
|
|
'worldpoliticsreview.com',
|
|
|
|
|
'wsj.com',
|
|
|
|
|
];
|
|
|
|
@ -199,7 +193,7 @@ var blockedRegexes = {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
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_corps_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', 'townsvillebulletin.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', 'themercury.com.au', 'townsvillebulletin.com.au', 'weeklytimesnow.com.au'];
|
|
|
|
|
|
|
|
|
|
const userAgentDesktop = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
|
|
|
|
|
const userAgentMobile = "Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible ; Googlebot/2.1 ; +http://www.google.com/bot.html)"
|
|
|
|
@ -246,12 +240,13 @@ ext_api.storage.sync.get({
|
|
|
|
|
if (enabledSites.includes('###_au_comm_media')) {
|
|
|
|
|
enabledSites = enabledSites.concat(au_comm_media_domains);
|
|
|
|
|
for (let domain of au_comm_media_domains) {
|
|
|
|
|
allow_cookies.push(domain);
|
|
|
|
|
blockedRegexes[domain] = /.+cdn-au\.piano\.io\/api\/tinypass.+\.js/;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (enabledSites.includes('###_au_news_corps')) {
|
|
|
|
|
enabledSites = enabledSites.concat(au_news_corps_domains);
|
|
|
|
|
for (let domain of au_news_corps_domains) {
|
|
|
|
|
if (enabledSites.includes('###_au_news_corp')) {
|
|
|
|
|
enabledSites = enabledSites.concat(au_news_corp_domains);
|
|
|
|
|
for (let domain of au_news_corp_domains) {
|
|
|
|
|
allow_cookies.push(domain);
|
|
|
|
|
use_google_bot_default.push(domain);
|
|
|
|
|
}
|
|
|
|
@ -282,8 +277,8 @@ ext_api.storage.onChanged.addListener(function (changes, namespace) {
|
|
|
|
|
enabledSites = enabledSites.concat(ad_region_domains);
|
|
|
|
|
if (enabledSites.includes('###_au_comm_media'))
|
|
|
|
|
enabledSites = enabledSites.concat(au_comm_media_domains);
|
|
|
|
|
if (enabledSites.includes('###_au_news_corps'))
|
|
|
|
|
enabledSites = enabledSites.concat(au_news_corps_domains);
|
|
|
|
|
if (enabledSites.includes('###_au_news_corp'))
|
|
|
|
|
enabledSites = enabledSites.concat(au_news_corp_domains);
|
|
|
|
|
// reset disableJavascriptOnListedSites eventListener
|
|
|
|
|
ext_api.webRequest.onBeforeRequest.removeListener(disableJavascriptOnListedSites);
|
|
|
|
|
ext_api.webRequest.handlerBehaviorChanged();
|
|
|
|
|