diff --git a/background.js b/background.js index c166112..d8b0abc 100755 --- a/background.js +++ b/background.js @@ -19,7 +19,7 @@ const restrictions = { 'bloombergquint.com': /^((?!\.bloombergquint\.com\/bq-blue-exclusive\/).)*$/, 'economictimes.com': /.+\.economictimes\.com\/($|(__assets|prime)(\/.+)?|.+\.cms)/, 'elespanol.com': /^((?!\/cronicaglobal\.elespanol\.com\/).)*$/, - 'elpais.com': /(\/elpais\.com\/$|\/(.+\.)?elpais\.com\/.+\.html)/, + 'elpais.com': /(\/elpais\.com\/$|(static|imagenes(\.\w+)?)\.elpais\.com|\/(.+\.)?elpais\.com\/.+\.html)/, 'faz.net': /^((?!\/.+\.faz\.net\/aktuell\/(\?switchfaznet)?$).)*$/, 'foreignaffairs.com': /.+\.foreignaffairs\.com\/(articles|fa-caching|interviews|reviews|sites)\/.+/, 'ft.com': /.+\.ft\.com\/content\//, @@ -308,7 +308,7 @@ var blockedRegexes = { 'elconfidencial.com': /\.tinypass\.com\//, 'elespanol.com': /\.eestatic\.com\/assets_js\/web\/v\d\/historia.*\.min\.js/, 'elmercurio.com': /\.(elmercurio\.com|emol\.cl)\/(.+\/)?js\/(.+\/)?(modal|merPramV\d|PramModal\.min)\.js/, - 'elpais.com': /(\.epimg\.net\/js\/.+\/(noticia|user)\.min\.js|\/elpais\.com\/arc\/subs\/p\.min\.js|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|consent)-.+\.js)/, + 'elpais.com': /(\/elpais\.com\/arc\/subs\/p\.min\.js|cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad|consent)-.+\.js)/, 'elperiodico.com': /cdn\.ampproject\.org\/v\d\/amp-(access|ad|consent)-.+\.js/, 'estadao.com.br': /acesso\.estadao\.com\.br\/paywall\/.+\/.+\.js/, 'estrellavalpo.cl': /(\.mercuriovalpo\.cl\/impresa\/.+\/assets\/(vendor|\d)\.js|pram\.pasedigital\.cl\/API\/User\/Status\?)/, diff --git a/changelog.txt b/changelog.txt index 061ccc4..d5eae32 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,7 @@ Changelog Bypass Paywalls Clean - Chrome Post-release +Fix El Pais (amp/videos) Fix Times Higher Education Fix WSJ (Chinese) diff --git a/contentScript.js b/contentScript.js index daadd66..a381058 100755 --- a/contentScript.js +++ b/contentScript.js @@ -686,14 +686,17 @@ else if (domain = matchDomain(es_unidad_domains)) { else if (matchDomain('elpais.com')) { let url = window.location.href; - let login_register = document.querySelector('.login_register'); + let login_register = document.querySelector('.login_register, #ctn_closed_article'); if (url.includes('.amp.html') || url.includes('?outputType=amp')) { + let preview = document.querySelector('div[amp-access="NOT success"]'); let paywall = document.querySelectorAll('div[amp-access="success"][amp-access-hide]'); for (let elem of paywall) elem.removeAttribute('amp-access-hide'); let amp_ads = document.querySelectorAll('amp-ad'); - removeDOMElement(login_register, ...amp_ads); + removeDOMElement(login_register, preview, ...amp_ads); } else { + let counter = document.querySelector('#counterLayerDiv'); + removeDOMElement(counter); let amphtml = document.querySelector('link[rel="amphtml"]'); if (login_register && amphtml) { removeDOMElement(login_register);