From cc1dc1cf1f9cf51d904a20a347803e148bae5346 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sat, 19 Jun 2021 19:04:16 +0200 Subject: [PATCH] Fix-update The Globe and Mail --- background.js | 3 ++- changelog.txt | 15 ++++++++------- contentScript.js | 5 +++-- custom/manifest.json | 2 +- manifest.json | 2 +- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/background.js b/background.js index 36879c1..429e819 100755 --- a/background.js +++ b/background.js @@ -383,12 +383,13 @@ var blockedRegexes = { 'sloanreview.mit.edu': /(\.tinypass\.com\/|\/sloanreview\.mit\.edu\/.+\/welcome-ad\.js)/, 'spectator.co.uk': /\.tinypass\.com\//, 'spectator.com.au': /\.tinypass\.com\//, - 'spectator.us': /(cdn\.cxense\.com\/|\.tinypass\.com\/.+)/, + 'spectator.us': /(cdn\.cxense\.com\/|\.tinypass\.com\/)/, 'svz.de': /cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|fx-flying-carpet)-.+\.js/, 'technologyreview.com': /\.blueconic\.net\//, 'telegraph.co.uk': /(\.tinypass\.com\/|cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js|\.telegraph\.co\.uk\/.+\/piano.+\.js|assets\.adobedtm\.com\/.+\.js)/, 'theartnewspaper.com': /\.amazonaws.com\/production-website-scripts\/bouncer\.js/, 'thedailybeast.com': /\.tinypass\.com\//, + 'theglobeandmail.com': /smartwall\.theglobeandmail\.com\//, 'thehindu.com': /(cdn\.cxense\.com\/|\.tinypass\.com\/)/, 'thehindubusinessline.com': /(cdn\.cxense\.com\/|\.tinypass\.com\/)/, 'thenation.com': /\.tinypass\.com\//, diff --git a/changelog.txt b/changelog.txt index 5062a28..716cda6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,7 @@ Remove The Northern Star (obsolete) Fix-update Atlantico.fr Fix-update Boston Globe (no opt-in) Fix-update Foreign Policy +Fix-update The Globe and Mail Fix-update The Spectator UK (amp) * v2.2.5.0 (2021-06-13) @@ -412,7 +413,7 @@ Add Westfaelische Rundschau Fix-update Australian Financial Review (images) Fix-update Domani (Italy) Fix-update El Pais (Spain) -Fix-update Globe and Mail (FF for Android v68) +Fix-update The Globe and Mail (FF for Android v68) Fix-update The Hindu (menu) Fix-update WSJ Add whitelist for BPC extension @@ -431,8 +432,8 @@ Minor update opt-in UI Add Business Times (Singapore) Add Domani (Italy) Add Variety -Fix-update Globe and Mail Fix-update MIT Technology Review (overlay) +Fix-update The Globe and Mail * v1.8.6.0 (2020-09-14) Add Star Tribune @@ -518,7 +519,7 @@ Add Business Standard (India) Add Geelong Advertiser & Western Advocate (plus grouping Australian sites) Add Nautilus Add Newsweek -Fix-update Globe and Mail (postfix premium links) +Fix-update The Globe and Mail (postfix premium links) Update paywall scripts: MatherAnalytics * v1.7.7.0 (2020-06-28) @@ -546,19 +547,19 @@ Add BBC History Extra Add Discover Magazine Add Irish Independent Add Republic.ru -Fix-update Globe and Mail (cleanup) Fix-update Telegraph.co.uk (cookies) +Fix-update The Globe and Mail (cleanup) Fix-update TheTimes.co.uk (cookies) * v1.7.4.0 (2020-06-04) Add ElMundo.es (amp for premium) Fix-update Boston Globe Fix-update DeMorgen.be (overlay) -Fix-update Globe and Mail (premium-only) Fix-update Medium (banner) Fix Medium custom domains Fix-update SeekingAlpha (limit robot-captcha) Fix-update Spectator.co.uk (amp for premium) +Fix-update The Globe and Mail (premium-only) New option to block external Javascript for custom sites Fix support Brave Browser Add block general paywall scripts: BlueConic, OneCount, Qiota & TribDss. Remove Outbrain. @@ -738,11 +739,11 @@ Fix Australian Financial Review (enable javascript) Fix Dagens Nyheter (dn.se) Fix Economist (Javascript/cookies) Fix ET Prime restrictions (only articles) -Fix Globe and Mail Fix Handelsblatt (Googlebot) Fix-update MIT Tech Review Fix LeParisien.fr (block TinyPass paywall) Fix LesEchos.fr (block TinyPass) +Fix The Globe and Mail Fix Toronto Star (enable Javascript) Remove The Athletic trial-banners Load sites from json @@ -752,10 +753,10 @@ Remove Google Analytics * v1.6.1.0 (2019-12-15) Add ET Prime Fix Foreign Policy (proper) -Fix-update Globe and Mail Fix Medium content on non-Medium sites Fix-update Philidelphia Inquirer (block paywall-script) Fix Spectator.co.uk (block paywall-script) +Fix-update The Globe and Mail Fix Quartz/qz.com (gdpr) Fix WSJ (reformatting & restrictions to only articles) Rename thenewsrep to new domain sofrep diff --git a/contentScript.js b/contentScript.js index 2691523..dc61836 100755 --- a/contentScript.js +++ b/contentScript.js @@ -1454,9 +1454,10 @@ else if (matchDomain('thetimes.co.uk')) { let block = document.querySelector('.subscription-block'); let adverts = document.querySelectorAll('#ad-article-inline, #sticky-ad-header, div[class*="InlineAdWrapper"], div[class*="NativeAd"], div.responsiveweb-sc-1exejum-0'); removeDOMElement(block, ...adverts); - let archive_url = 'https://archive.is?url=' + window.location.href; + let url = window.location.href; + let archive_url = 'https://archive.is?url=' + url; let paywall = document.querySelector('div#paywall-portal-article-footer'); - if (paywall) { + if (paywall && !url.includes('?shareToken=')) { removeDOMElement(paywall); let text_fail_div = document.createElement('div'); text_fail_div.appendChild(document.createTextNode('BPC > Read full article text:\r\n')); diff --git a/custom/manifest.json b/custom/manifest.json index c0e1ec8..f737b3a 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -30,5 +30,5 @@ "webRequestBlocking", "" ], - "version": "2.2.5.4" + "version": "2.2.5.5" } \ No newline at end of file diff --git a/manifest.json b/manifest.json index 1449db3..36d3cf3 100755 --- a/manifest.json +++ b/manifest.json @@ -513,5 +513,5 @@ "*://*.wallkit.net/*", "*://*.wsj.net/*" ], - "version": "2.2.5.4" + "version": "2.2.5.5" } \ No newline at end of file