diff --git a/README.md b/README.md index dff0a3cf..565c9847 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,7 @@ So don't update to Firefox 79 or use Firefox Nightly (and load BPC from a custom ##### Italy [Corriere Della Sera](https://www.corriere.it) - [Domani](https://editorialedomani.it) - +[GElocal.it](https://quotidiani.gelocal.it) - [Il Fatto Quotidiano](https://www.ilfattoquotidiano.it) - [Il Manifesto](https://ilmanifesto.it) - [Il Messaggero](https://www.ilmessaggero.it) - diff --git a/background.js b/background.js index 0dabf049..dbb7a58d 100644 --- a/background.js +++ b/background.js @@ -43,6 +43,7 @@ var allow_cookies = [ 'faz.net', 'folha.uol.com.br', 'ftm.nl', + 'gelocal.it', 'gestion.pe', 'haaretz.co.il', 'haaretz.com', @@ -185,6 +186,7 @@ var blockedRegexes = { 'elpais.com': /.+\.epimg\.net\/js\/.+\/noticia\.min\.js/, 'exame.abril.com.br': /.+\.tinypass\.com\/.+/, 'folha.uol.com.br': /.+\.folha\.uol\.com\.br\/paywall\/js\/.+\/publicidade\.ads\.js/, + 'gelocal.it': /cdn\.ampproject\.org\/v\d\/amp-access-.+\.js/, 'globo.com': /.+\.tinypass\.com\/.+/, 'foreignaffairs.com': /.+\.foreignaffairs\.com\/sites\/default\/files\/js\/js_P9zr.+\.js/, 'foreignpolicy.com': /.+\.tinypass\.com\/.+/, diff --git a/changelog.txt b/changelog.txt index 63d877ed..5cd00290 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox Post-release Add Foreign Affairs +Add GElocal.it Add Il Resto del Carlino (Italy) Add Kurier.at Add L'Orient-Le Jour (Lebanon) diff --git a/contentScript.js b/contentScript.js index ec1b15ce..d455b296 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1390,6 +1390,24 @@ else if (matchDomain("kurier.at")) { plus_content.classList.remove('plusContent'); } +else if (matchDomain('gelocal.it')) { + let premium = document.querySelector('.paywall-adagio'); + let url = window.location.href; + window.setTimeout(function () { + if (premium && !url.includes('/amp/')) { + if (url.includes('?')) + window.location.href = url.replace('?', '/amp/?'); + else + window.location.href = url + '/amp/'; + } + }, 500); // Delay (in milliseconds) + if (url.includes('/amp/')) { + let paywall = document.querySelector('div[amp-access="showContent"]'); + if (paywall) + paywall.removeAttribute('amp-access-hide'); + } +} + // General Functions function removeDOMElement(...elements) { for (let element of elements) { diff --git a/manifest.json b/manifest.json index 4bda2e1a..04ea94de 100644 --- a/manifest.json +++ b/manifest.json @@ -115,6 +115,7 @@ "*://*.ft.com/*", "*://*.ftm.nl/*", "*://*.geelongadvertiser.com.au/*", + "*://*.gelocal.it/*", "*://*.gestion.pe/*", "*://*.gladstoneobserver.com.au/*", "*://*.glassdoor.com/*", @@ -335,5 +336,5 @@ "webRequest", "webRequestBlocking" ], - "version": "1.9.1.8" + "version": "1.9.1.9" } \ No newline at end of file diff --git a/sites.js b/sites.js index 82a8c534..1fe3690e 100644 --- a/sites.js +++ b/sites.js @@ -59,6 +59,7 @@ var defaultSites = "Foreign Policy": "foreignpolicy.com", "Fortune": "fortune.com", "Frankfurter Allgemeine Zeitung": "faz.net", + "GElocal.it": "gelocal.it", "GestiĆ³n": "gestion.pe", "Glassdoor": "glassdoor.com", "Globes": "globes.co.il",