diff --git a/README.md b/README.md index bd0931a..85dcd4e 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,20 @@ Install add-on by downloading xpi-file. [The Standard](https://www.standard.net.au) - [Western Advocate](https://www.westernadvocate.com.au) +#### > 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) - +[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 Northern Star](https://www.northernstar.com.au) - +[The Queensland Times](https://www.qt.com.au) - +[Toowoomba Chronicle](https://www.thechronicle.com.au) - +[Warwick Daily News](https://www.warwickdailynews.com.au) + #### Canada [Le Devoir](https://www.ledevoir.com) - [National Post](https://www.nationalpost.com) - diff --git a/background.js b/background.js index 0bc3c10..4bc8d64 100644 --- a/background.js +++ b/background.js @@ -204,6 +204,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_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 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', 'northernstar.com.au', 'qt.com.au', 'thechronicle.com.au', 'warwickdailynews.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)" @@ -262,6 +263,12 @@ ext_api.storage.sync.get({ } use_google_bot = use_google_bot_default.slice(); } + if (enabledSites.includes('###_au_prov_news')) { + enabledSites = enabledSites.concat(au_prov_news_domains); + for (let domain of au_prov_news_domains) { + allow_cookies.push(domain); + } + } for (let domainVar of enabledSites) { if (!allow_cookies.includes(domainVar) && !remove_cookies.includes(domainVar)) { @@ -289,6 +296,8 @@ ext_api.storage.onChanged.addListener(function (changes, namespace) { enabledSites = enabledSites.concat(au_comm_media_domains); if (enabledSites.includes('###_au_news_corp')) enabledSites = enabledSites.concat(au_news_corp_domains); + if (enabledSites.includes('###_au_prov_news')) + enabledSites = enabledSites.concat(au_prov_news_domains); // reset disableJavascriptOnListedSites eventListener ext_api.webRequest.onBeforeRequest.removeListener(disableJavascriptOnListedSites); ext_api.webRequest.handlerBehaviorChanged(); diff --git a/contentScript.js b/contentScript.js index 2f8e08d..8536bbe 100644 --- a/contentScript.js +++ b/contentScript.js @@ -11,6 +11,13 @@ if (matchDomain("thesaturdaypaper.com.au")) { removeDOMElement(paywall); } +// Australian Provincial Newspapers +else if (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); + } +} + // Australian Community Media newspapers else if (window.location.hostname.endsWith(".com.au") || window.location.hostname.endsWith(".net.au")) { let au_sites = ['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']; @@ -703,8 +710,7 @@ else if (matchDomain('historyextra.com')) { removeDOMElement(ad_banner); } -else if (matchDomain(['independent.ie', 'belfasttelegraph.co.uk'])) { - let domain = matchDomain(['independent.ie', 'belfasttelegraph.co.uk']); +else if (domain = matchDomain(['independent.ie', 'belfasttelegraph.co.uk'])) { if (!cookieExists('subscriber')) { setCookie('subscriber', '{"subscriptionStatus": true}', domain, '/', 14); } diff --git a/lp/manifest.json b/lp/manifest.json index 9fd48ad..708968e 100644 --- a/lp/manifest.json +++ b/lp/manifest.json @@ -73,7 +73,9 @@ "*://*.csmonitor.com/*", "*://*.cw.com.tw/*", "*://*.dailyadvertiser.com.au/*", + "*://*.dailyexaminer.com.au/*", "*://*.dailyliberal.com.au/*", + "*://*.dailymercury.com.au/*", "*://*.dailypress.com/*", "*://*.dailytelegraph.com.au/*", "*://*.darkreading.com/*", @@ -98,15 +100,18 @@ "*://*.folha.uol.com.br/*", "*://*.foreignpolicy.com/*", "*://*.fortune.com/*", + "*://*.frasercoastchronicle.com.au/*", "*://*.ft.com/*", "*://*.ftm.nl/*", "*://*.geelongadvertiser.com.au/*", "*://*.gestion.pe/*", + "*://*.gladstoneobserver.com.au/*", "*://*.glassdoor.com/*", "*://*.globes.co.il/*", "*://*.globo.com/*", "*://*.goldcoastbulletin.com.au/*", "*://*.groene.nl/*", + "*://*.gympietimes.com.au/*", "*://*.haaretz.co.il/*", "*://*.haaretz.com/*", "*://*.handelsblatt.com/*", @@ -116,8 +121,8 @@ "*://*.heraldsun.com.au/*", "*://*.historyextra.com/*", "*://*.humo.be/*", - "*://*.illawarramercury.com.au/*", "*://*.ilfattoquotidiano.it/*", + "*://*.illawarramercury.com.au/*", "*://*.ilmanifesto.it/*", "*://*.ilmessaggero.it/*", "*://*.inc.com/*", @@ -127,6 +132,7 @@ "*://*.intelligentinvestor.com.au/*", "*://*.irishtimes.com/*", "*://*.japantimes.co.jp/*", + "*://*.journaldunet.com/*", "*://*.journalnow.com/*", "*://*.knack.be/*", "*://*.labusinessjournal.com/*", @@ -140,7 +146,6 @@ "*://*.lecho.be/*", "*://*.ledevoir.com/*", "*://*.lejdd.fr/*", - "*://*.journaldunet.com/*", "*://*.leparisien.fr/*", "*://*.lescienze.it/*", "*://*.lesechos.com/*", @@ -165,11 +170,13 @@ "*://*.newcastleherald.com.au/*", "*://*.newrepublic.com/*", "*://*.news-gazette.com/*", + "*://*.news-mail.com.au/*", "*://*.newstatesman.com/*", "*://*.newsweek.com/*", "*://*.newyorker.com/*", "*://*.noordhollandsdagblad.nl/*", "*://*.northerndailyleader.com.au/*", + "*://*.northernstar.com.au/*", "*://*.nrc.nl/*", "*://*.ntnews.com.au/*", "*://*.nymag.com/*", @@ -183,6 +190,7 @@ "*://*.philosophynow.org/*", "*://*.portnews.com.au/*", "*://*.post-gazette.com/*", + "*://*.qt.com.au/*", "*://*.quora.com/*", "*://*.qz.com/*", "*://*.repubblica.it/*", @@ -206,6 +214,7 @@ "*://*.statista.com/*", "*://*.sueddeutsche.de/*", "*://*.sun-sentinel.com/*", + "*://*.sunshinecoastdaily.com.au/*", "*://*.switzersuperreport.com.au/*", "*://*.techinasia.com/*", "*://*.technologyreview.com/*", @@ -219,6 +228,7 @@ "*://*.theathletic.com/*", "*://*.theatlantic.com/*", "*://*.theaustralian.com.au/*", + "*://*.thechronicle.com.au/*", "*://*.thecourier.com.au/*", "*://*.thedailybeast.com/*", "*://*.thediplomat.com/*", @@ -226,6 +236,7 @@ "*://*.thehindu.com/*", "*://*.themarker.com/*", "*://*.themercury.com.au/*", + "*://*.themorningbulletin.com.au/*", "*://*.thenation.com/*", "*://*.thesaturdaypaper.com.au/*", "*://*.thestar.com/*", @@ -238,6 +249,7 @@ "*://*.vanityfair.com/*", "*://*.vn.nl/*", "*://*.volkskrant.nl/*", + "*://*.warwickdailynews.com.au/*", "*://*.washingtonpost.com/*", "*://*.watoday.com.au/*", "*://*.weeklytimesnow.com.au/*", diff --git a/sites.js b/sites.js index b99a558..22035bb 100644 --- a/sites.js +++ b/sites.js @@ -9,6 +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", "Baltimore Sun": "baltimoresun.com", "Barron's": "barrons.com", "BBC History Extra": "historyextra.com",