From 3f6f161d3fe78b937d1719ad71cee4102d51f7e6 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 22 Nov 2020 15:25:28 +0100 Subject: [PATCH] Fix-update Corriere Della Sera (redirect preview) --- background.js | 2 +- changelog.txt | 1 + contentScript.js | 9 +++++++++ manifest.json | 3 +-- version.js | 9 ++++++--- 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/background.js b/background.js index 49ef55be..fa8ce215 100644 --- a/background.js +++ b/background.js @@ -183,7 +183,7 @@ var blockedRegexes = { 'chicagotribune.com': /.+:\/\/.+\.tribdss\.com\/.+/, 'chronicle.com': /(.+\.blueconic\.net\/.+|assets\.login\.chronicle\.com\/common\/che-auth0-user\.js)/, 'clarin.com': /js\.matheranalytics\.com\/.+/, - 'corriere.it': /(\.rcsobjects\.it\/(rcs_cpmt|rcs_tracking-service)\/|\.corriereobjects\.it\/.+\/js\/(_paywall\.sjs|tracking\/)|\.userzoom\.com\/files\/js\/|\.lp4\.io\/app\/)/, + 'corriere.it': /(cdn\.tinypass\.com\/.+|\.rcsobjects\.it\/(rcs_cpmt|rcs_tracking-service)\/|\.corriereobjects\.it\/.+\/js\/(_paywall\.sjs|tracking\/)|\.userzoom\.com\/files\/js\/)/, 'digiday.com': /cdn\.tinypass\.com\/.+/, 'dvhn.nl': /.+\.evolok\.net\/.+\/authorize\/.+/, 'economist.com': /cdn\.tinypass\.com\/.+/, diff --git a/changelog.txt b/changelog.txt index ea9ea3bf..68e83a90 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release Add Grupo Vocento (Spain, regional daily) +Fix-update Corriere Della Sera (redirect preview) Update block general paywall script (Pelcro) Update grouped sites (init rules) diff --git a/contentScript.js b/contentScript.js index 34d91654..74bf8e1f 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1657,6 +1657,15 @@ else if (matchDomain(es_grupo_vocento_domains)) { } } +else if (matchDomain("corriere.it")) { + let url = window.location.href; + if (url.includes('_preview.shtml')) { + window.setTimeout(function () { + window.location.href = url.replace('_preview.shtml', '.shtml').split('?')[0]; + }, 500); // Delay (in milliseconds) + } +} + // General Functions function removeDOMElement(...elements) { for (let element of elements) { diff --git a/manifest.json b/manifest.json index 5fd47740..c1503eee 100644 --- a/manifest.json +++ b/manifest.json @@ -347,7 +347,6 @@ "*://*.htmedia.in/*", "*://*.jsdelivr.net/*", "*://*.lightboxcdn.com/*", - "*://*.lp4.io/*", "*://*.mppglobal.com/*", "*://*.nyt.com/*", "*://*.pasedigital.cl/*", @@ -356,5 +355,5 @@ "*://*.repstatic.it/*", "*://*.userzoom.com/*" ], - "version": "1.9.6.2" + "version": "1.9.6.3" } \ No newline at end of file diff --git a/version.js b/version.js index b907ceae..2cc9b8f5 100644 --- a/version.js +++ b/version.js @@ -20,9 +20,12 @@ fetch(proxyurl + manifest_new) versionString_new.appendChild(document.createTextNode('* ')); var anchorEl = document.createElement('a'); anchorEl.text = 'New release v' + version_new; - if (manifestData.applications.gecko.id.includes('magnolia')) - anchorEl.href = 'https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases'; - else + if (manifestData.applications.gecko.id.includes('magnolia')) { + if (installType === 'development') + anchorEl.href = 'https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean'; + else + anchorEl.href = 'https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases'; + } else anchorEl.href = 'https://addons.mozilla.org/en-US/firefox/addon/bypass-paywalls-clean'; anchorEl.target = '_blank'; versionString_new.appendChild(anchorEl);