From 3b0b54012ba590a5b4f3f02da2ba22adcf6e1578 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Sun, 21 Jan 2024 10:25:19 +0100 Subject: [PATCH] Fix Grupo Abril (images/embeds) --- background.js | 2 +- changelog.txt | 1 + contentScript_once_var.js | 13 ++++++++++++- sites.js | 3 +-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/background.js b/background.js index 0731dbd..ff357c8 100644 --- a/background.js +++ b/background.js @@ -946,7 +946,7 @@ if (typeof browser !== 'object') { } } - var set_var_sites = ['journaldemontreal.com', 'journaldequebec.com', 'nzherald.co.nz', 'theglobeandmail.com'].concat(de_madsack_domains); + var set_var_sites = ['abril.com.br', 'journaldemontreal.com', 'journaldequebec.com', 'nzherald.co.nz', 'theglobeandmail.com'].concat(de_madsack_domains); function runOnTab_once_var(tab) { let tabId = tab.id; let url = tab.url; diff --git a/changelog.txt b/changelog.txt index a1e589c..f56e4db 100644 --- a/changelog.txt +++ b/changelog.txt @@ -9,6 +9,7 @@ Add Mediahuis Belgie (fetch from archive.is) Add Mediahuis Nederland Regional (fetch from archive.is) Add Wiwo.de (fetch from archive.is) Remove Franc-Tireur.fr (fix obsolete) +Fix Grupo Abril (images/embeds) Fix Hearst magazines (js) Fix Independent.co.uk (premium images) Fix The (New Orleans) Advocate (gambit) diff --git a/contentScript_once_var.js b/contentScript_once_var.js index 58c3d4f..e4e4421 100644 --- a/contentScript_once_var.js +++ b/contentScript_once_var.js @@ -6,7 +6,7 @@ var de_madsack_domains = ['haz.de', 'kn-online.de', 'ln-online.de', 'lvz.de', 'm if (hostname.match(/\.de$/)) { -if (matchDomain(de_madsack_domains) || document.querySelector('link[href*=".rndtech.de/"]')) { +if (matchDomain(de_madsack_domains) || document.querySelector('head > link[href*=".rndtech.de/"]')) { function madsack_main() { for (let n = 0; n < 10; n++) { window.setTimeout(function () { @@ -21,6 +21,17 @@ if (matchDomain(de_madsack_domains) || document.querySelector('link[href*=".rndt } +else if (matchDomain('abril.com.br')) { + function abril_main() { + for (let n = 0; n < 10; n++) { + window.setTimeout(function () { + window.wp_paywall_vars = ''; + }, n * 50); + } + } + insert_script(abril_main); +} + else if (matchDomain(['journaldemontreal.com', 'journaldequebec.com'])) { for (let n = 0; n < 10; n++) { window.setTimeout(function () { diff --git a/sites.js b/sites.js index 8c4db4a..7248c11 100644 --- a/sites.js +++ b/sites.js @@ -929,8 +929,7 @@ var defaultSites = { }, "Grupo Abril": { domain: "abril.com.br", - allow_cookies: 1, - block_js_inline: /\.abril\.com\.br\/.+\/(\w+\-+){3,}/ + allow_cookies: 1 }, "Grupo Clarín": { domain: "###_ar_grupo_clarin",