From 31cb5424d7a11cd637f0e8e6c3cc87a6a2590302 Mon Sep 17 00:00:00 2001 From: Rodrigo O Date: Thu, 24 May 2018 20:14:55 -0300 Subject: [PATCH] Corrige Revista Exame --- webext/content.js | 24 +++++++++++++----------- webext/manifest.json | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/webext/content.js b/webext/content.js index f234d90..4a30e87 100644 --- a/webext/content.js +++ b/webext/content.js @@ -1,5 +1,16 @@ // run_at: document_idle +const ABRIL_CODE = ` + document.querySelectorAll('.callpaywall') + .forEach(x => x.remove()); + document.querySelectorAll('.content-blocked') + .forEach(x => x.classList.remove('content-blocked')) +`; + const INJECTION = { + exame: { + url: /exame\.abril\.com\.br/, + code: ABRIL_CODE + }, oglobo: { url: /oglobo\.globo\.com/, code: 'paywallAtivo = false;' @@ -39,20 +50,11 @@ const INJECTION = { }, superinteressante: { url: /super.abril.com.br/, - code: ` - document.querySelectorAll('.callpaywall') - .forEach(x => x.remove()); - document.querySelectorAll('.content-blocked') - .forEach(x => x.classList.remove('content-blocked')) - ` + code: ABRIL_CODE }, veja: { url: /veja.abril.com.br/, - code: ` - document.querySelector('.content-blocked').classList - .remove('content-blocked'); - document.querySelector('.callpaywall').remove(); - ` + code: ABRIL_CODE }, medium: { url: /medium.com/, diff --git a/webext/manifest.json b/webext/manifest.json index d1bbf25..aed66c9 100644 --- a/webext/manifest.json +++ b/webext/manifest.json @@ -2,7 +2,6 @@ "manifest_version": 2, "name": "burlesco", "version": "7.0.1", - "version_name": "7.0 beta 1", "description": "Leia notícias sem ser assinante, burle o paywall", "homepage_url": "https://burles.co", "author": "rodorgas", @@ -22,6 +21,7 @@ "matches": [ "*://*.oglobo.globo.com/*", "*://www.economist.com/*", + "*://*.exame.abril.com.br/*", "*://foreignpolicy.com/*", "*://*.folha.uol.com.br/*", "*://*.folha.com.br/*",