From 0fb157700ccf6b519420db3216b9d41611c6cebc Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Fri, 22 Oct 2021 20:55:17 +0200 Subject: [PATCH] Remove Irish Times (obsolete) --- README.md | 1 - background.js | 3 +-- changelog.txt | 1 + contentScript.js | 18 +++--------------- manifest.json | 1 - sites.js | 1 - 6 files changed, 5 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index a8eff98d..5140bd90 100644 --- a/README.md +++ b/README.md @@ -254,7 +254,6 @@ Grouped in options:\ [Prospect Magazine](https://www.prospectmagazine.co.uk) - [The Athletic UK](https://theathletic.co.uk) - [The Economist](https://www.economist.com) - -[The Irish Times](https://www.irishtimes.com) - [The New Statesman](https://www.newstatesman.com) - [The Spectator](https://www.spectator.co.uk) - [The Telegraph](https://www.telegraph.co.uk) - diff --git a/background.js b/background.js index e5f7842c..3b0e0ce5 100644 --- a/background.js +++ b/background.js @@ -343,7 +343,6 @@ var blockedRegexes = { 'inc42.com': /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|ad|analytics)-.+\.(m)?js)/, 'independent.ie': /(cdn\.flip-pay\.com\/clients\/inm\/flip-pay\.js|cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js)/, 'inquirer.com': /\.tinypass\.com\//, - 'irishtimes.com': /cdn\.ampproject\.org\/v\d\/amp-(access|ad)-.+\.js/, 'japantimes.co.jp': /\.piano\.io\//, 'jpost.com': /\.jpost\.com\/bundles\/js_article\?/, 'knack.be': /(\.knack\.be\/js\/responsive\/rmg(Modal|Paywall)\.js|\.blueconic\.net\/)/, @@ -1278,7 +1277,7 @@ ext_api.webRequest.onBeforeSendHeaders.addListener(function(details) { let usa_today_site = (matchUrlDomain('gannett-cdn.com', details.url) && matchUrlDomain(['usatoday.com'], header_referer)); allow_ext_source = allow_ext_source || inkl_site || cl_elmerc_site || es_elesp_site || it_repubblica_site || usa_law360_site || usa_mw_site || usa_natgeo_site || usa_today_site; - 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', 'economist.com', 'elpais.com', 'elperiodico.com', 'freiepresse.de', 'ft.com', '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', 'svz.de', 'telegraph.co.uk', 'washingtonpost.com', 'westfalen-blatt.de', 'wn.de', 'wsj.com'].concat(amp_unhide, 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)); + 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', 'economist.com', 'elpais.com', 'elperiodico.com', 'freiepresse.de', 'ft.com', 'handelsblatt.com', 'ilfattoquotidiano.it', 'inc42.com', 'independent.ie', 'la-croix.com', 'marketwatch.com', 'nationalreview.com', 'noz.de', 'nwzonline.de', 'scmp.com', 'seekingalpha.com', 'shz.de', 'staradvertiser.com', 'svz.de', 'telegraph.co.uk', 'washingtonpost.com', 'westfalen-blatt.de', 'wn.de', 'wsj.com'].concat(amp_unhide, 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_swm_site) { diff --git a/changelog.txt b/changelog.txt index 2e9a10b7..6583e926 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release Add Marianne (France) +Remove Irish Times (obsolete) Remove Sueddeutsche Zeitung (obsolete) Fix ABC.es (Evolok) Fix Bloomberg (charts) diff --git a/contentScript.js b/contentScript.js index 7bc63594..2e73521d 100644 --- a/contentScript.js +++ b/contentScript.js @@ -25,7 +25,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(de_funke_media_domains, es_grupo_vocento_domains, es_unidad_domains, no_nhst_media_domains); +var arr_localstorage_hold = ['augsburger-allgemeine.de', 'charliehebdo.fr', 'cmjornal.pt', 'houstonchronicle.com', 'inc42.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(); } @@ -1379,21 +1379,9 @@ else if (matchDomain('telegraaf.nl')) { else csDone = true; -} else if (window.location.hostname.match(/\.(ie|uk)$/) || matchDomain(['irishtimes.com', 'theathletic.com'])) {//united kingdom/ireland +} else if (window.location.hostname.match(/\.(ie|uk)$/) || matchDomain(['theathletic.com'])) {//united kingdom/ireland -if (matchDomain('irishtimes.com')) { - document.addEventListener('DOMContentLoaded', () => { - let amphtml = document.querySelector('link[rel="amphtml"]'); - let stub_article_msg = document.querySelector('div.stub-article-msg'); - let url = window.location.href; - if ((url.includes('mode=sample') || stub_article_msg) && amphtml) - window.location.href = amphtml.href; - let amp_ads = document.querySelectorAll('.amp-ad-container'); - removeDOMElement(...amp_ads); - }); -} - -else if (matchDomain('prospectmagazine.co.uk')) { +if (matchDomain('prospectmagazine.co.uk')) { let url = window.location.href; document.addEventListener('DOMContentLoaded', () => { let paywall = document.querySelector('div.paywall_overlay_blend, div.paywall'); diff --git a/manifest.json b/manifest.json index 6820c245..7d8c7a92 100644 --- a/manifest.json +++ b/manifest.json @@ -245,7 +245,6 @@ "*://*.inquirer.com/*", "*://*.intelligentinvestor.com.au/*", "*://*.intrafish.com/*", - "*://*.irishtimes.com/*", "*://*.japantimes.co.jp/*", "*://*.journaldunet.com/*", "*://*.journalnow.com/*", diff --git a/sites.js b/sites.js index 84fb1716..02bf9ac2 100644 --- a/sites.js +++ b/sites.js @@ -253,7 +253,6 @@ var defaultSites = "The Hindu": "thehindu.com", "The Hindu BusinessLine": "thehindubusinessline.com", "The Intercept": "theintercept.com", - "The Irish Times": "irishtimes.com", "The Japan Times": "japantimes.co.jp", "The Jerusalem Post": "jpost.com", "The Logic": "thelogic.co",