From 0b09c18b49478f1367a4ed8bffdaeae8b52425ff Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 27 Feb 2022 15:24:00 +0100 Subject: [PATCH] Remove NewcastleHerald.com.au (fix obsolete) --- README.md | 1 - background.js | 2 +- changelog.txt | 1 + contentScript.js | 20 +------------------- manifest.json | 1 - sites.js | 1 - 6 files changed, 3 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 4ba8b89..141d057 100644 --- a/README.md +++ b/README.md @@ -616,7 +616,6 @@ Grouped in options:\ [Central Western Daily](https://www.centralwesterndaily.com.au) - [Daily Liberal](https://www.dailyliberal.com.au) - [Illawarra Mercury](https://www.illawarramercury.com.au) - -[Newcastle Herald](https://www.newcastleherald.com.au)* - [The Advocate](https://www.theadvocate.com.au) - [The Border Mail](https://www.bordermail.com.au) - [The Canberra Times](https://www.canberratimes.com.au) - diff --git a/background.js b/background.js index 01f2aa4..39ad06d 100644 --- a/background.js +++ b/background.js @@ -8,7 +8,7 @@ var ext_name = manifestData.name; var ext_version = manifestData.version; const cs_limit_except = ['elespanol.com', 'faz.net', 'inkl.com', 'nation.africa', 'nationalgeographic.com', 'thetimes.co.uk']; -const dompurify_sites = ['asiatimes.com', 'bloomberg.com', 'cicero.de', 'economictimes.com', 'hs.fi', 'lesechos.fr', 'marianne.net', 'newcastleherald.com.au', 'newleftreview.org', 'nzherald.co.nz', 'prospectmagazine.co.uk', 'stratfor.com', 'techinasia.com', 'timesofindia.com', 'valor.globo.com', 'vn.nl'].concat(fr_groupe_sud_ouest_domains, nl_mediahuis_region_domains, no_nhst_media_domains, usa_theathletic_domains); +const dompurify_sites = ['asiatimes.com', 'bloomberg.com', 'cicero.de', 'economictimes.com', 'hs.fi', 'lesechos.fr', 'marianne.net', 'newleftreview.org', 'nzherald.co.nz', 'prospectmagazine.co.uk', 'stratfor.com', 'techinasia.com', 'timesofindia.com', 'valor.globo.com', 'vn.nl'].concat(fr_groupe_sud_ouest_domains, nl_mediahuis_region_domains, no_nhst_media_domains, usa_theathletic_domains); var currentTabUrl = ''; var csDone = false; var optin_setcookie = false; diff --git a/changelog.txt b/changelog.txt index 559b03e..f576a10 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,7 @@ Post-release Add Cycling Tips Add Iltalehti.fi Add Postmedia Network (Canada) +Remove NewcastleHerald.com.au (fix obsolete) Fix Westfalen-Blatt (gallery) Fix update check (GitLab CORS issue or BitBucket http error 429) Update custom sites (load text from json) diff --git a/contentScript.js b/contentScript.js index a6ed8d8..fe32927 100644 --- a/contentScript.js +++ b/contentScript.js @@ -228,27 +228,9 @@ else if (domain = matchDomain(["brisbanetimes.com.au", "smh.com.au", "theage.com else { // Australian Community Media newspapers - let 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']; + let 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', 'northerndailyleader.com.au', 'portnews.com.au', 'standard.net.au', 'theadvocate.com.au', 'thecourier.com.au', 'westernadvocate.com.au']; let au_piano_script = document.querySelector('script[src="https://cdn-au.piano.io/api/tinypass.min.js"]'); if (matchDomain(au_comm_media_domains) || au_piano_script) { - if (matchDomain('newcastleherald.com.au')) { - let paywall = document.querySelector('div[style^="-webkit-mask-image"]'); - if (paywall) { - paywall.removeAttribute('style'); - let url_src = window.location.href.replace('newcastleherald.com.au', 'canberratimes.com.au'); - replaceDomElementExt(url_src, true, false, 'p[class^="Paragraph_wrapper__"]', 'BPC > text not available on other group site: ', 'div.article__body'); - } - let hidden_images = document.querySelectorAll('img[src^="data:image/"][data-src]'); - for (let hidden_image of hidden_images) - hidden_image.setAttribute('src', hidden_image.getAttribute('data-src')); - let lead_image = document.querySelector('div#story-body img.w-full[src]'); - if (lead_image) { - let lead_src = lead_image.src.split(/\.(png|jpg)/i)[0]; - let body_image = document.querySelector('div.article__body img[src]'); - if (lead_src && body_image && body_image.src.includes(lead_src)) - removeDOMElement(body_image); - } - } let subscribe_truncate = document.querySelector('.subscribe-truncate'); if (subscribe_truncate) subscribe_truncate.classList.remove('subscribe-truncate'); diff --git a/manifest.json b/manifest.json index 1942741..a892e53 100644 --- a/manifest.json +++ b/manifest.json @@ -379,7 +379,6 @@ "*://*.nationalreview.com/*", "*://*.nautil.us/*", "*://*.neuepresse.de/*", - "*://*.newcastleherald.com.au/*", "*://*.newleftreview.org/*", "*://*.newrepublic.com/*", "*://*.newsday.com/*", diff --git a/sites.js b/sites.js index ac6901f..75bb37e 100644 --- a/sites.js +++ b/sites.js @@ -140,7 +140,6 @@ var defaultSites = { "dailyliberal.com.au", "examiner.com.au", "illawarramercury.com.au", - "newcastleherald.com.au", "northerndailyleader.com.au", "portnews.com.au", "standard.net.au",