Remove Gazet van Antwerpen (obsolete)

This commit is contained in:
magnolia1234 2021-09-27 16:31:46 +02:00
parent 3c442171b7
commit 3c8f10fea4
7 changed files with 4 additions and 96 deletions

View file

@ -408,7 +408,6 @@ Grouped in options:\
[De Tijd](https://www.tijd.be) -
[Financieele Dagblad](https://fd.nl) -
[Follow the Money](https://www.ftm.nl) -
[Gazet van Antwerpen](https://www.gva.be) -
[Groene Amsterdammer](https://www.groene.nl) -
[Humo](https://www.humo.be) -
[Knack](https://www.knack.be) -

View file

@ -83,7 +83,6 @@ var allow_cookies_default = [
'freiepresse.de',
'ftm.nl',
'gestion.pe',
'gva.be',
'haaretz.co.il',
'haaretz.com',
'handelsblatt.com',
@ -1318,7 +1317,7 @@ if (matchUrlDomain(change_headers, details.url) && (!['font', 'image', 'styleshe
}
if ((!['font', 'stylesheet'].includes(details.type) || matchUrlDomain(cs_limit_except, currentTabUrl)) && !csDone) {
let lib_file = 'lib/empty.js';
if (matchUrlDomain(['bloomberg.com', 'cicero.de', 'economictimes.com', 'gva.be', 'lesechos.fr', 'newleftreview.org', 'newyorker.com', 'nzherald.co.nz', 'prospectmagazine.co.uk', 'sudouest.fr', 'techinasia.com', 'valor.globo.com', 'washingtonpost.com'].concat(nl_mediahuis_region_domains, no_nhst_media_domains, usa_theathletic_domains), currentTabUrl))
if (matchUrlDomain(['bloomberg.com', 'cicero.de', 'economictimes.com', 'lesechos.fr', 'newleftreview.org', 'newyorker.com', 'nzherald.co.nz', 'prospectmagazine.co.uk', 'sudouest.fr', 'techinasia.com', 'valor.globo.com', 'washingtonpost.com'].concat(nl_mediahuis_region_domains, no_nhst_media_domains, usa_theathletic_domains), currentTabUrl))
lib_file = 'lib/purify.min.js';
ext_api.tabs.executeScript(tabId, {
file: lib_file,

View file

@ -2,6 +2,7 @@
Changelog Bypass Paywalls Clean - Firefox
Post-release
Remove Gazet van Antwerpen (obsolete)
Fix Telerama.fr (mobile)
* v2.3.7.0 (2021-09-26)

View file

@ -1185,95 +1185,6 @@ else if (matchDomain('ftm.nl')) {
removeDOMElement(banner_pp);
}
else if (matchDomain('gva.be')) {
document.addEventListener('DOMContentLoaded', () => {
let paywall = document.querySelector('div[data-cj-root="subscription-wall"]');
removeDOMElement(paywall);
if (paywall) {
let main_content = document.querySelector('div[data-mht-block="article-detail__article-main"]');
let json_script = main_content.querySelector('script');
let json_str = json_script.text.substring(json_script.textContent.indexOf('{'));
let json = JSON.parse(json_str);
let premium = Object.values(json)[0]['premium'];
if (json) {
let json_text = Object.values(json)[0]['data']['article']['body'];
let parser = new DOMParser();
let div_content = main_content.querySelector('div');
div_content.setAttribute('class', 'gva-6c6ea21_marginbottom5 gva-28c280e9_contentwrapper');
let par_elem, par_key, par_li, par_html;
let head = document.querySelector('head');
let streamone = false;
let flourish = false;
for (let par of json_text) {
for (let key in par) {
par_elem = document.createElement('p');
par_key = par[key];
if (['p', 'subhead'].includes(key)) {
if (par_key.includes('<')) {
par_html = parser.parseFromString('<p>' + DOMPurify.sanitize(par_key) + '</p>', 'text/html');
par_elem = par_html.querySelector('p');
} else
par_elem.innerText = par_key;
if (key === 'subhead')
par_elem.setAttribute('style', 'font-weight: bold;');
} else if (key === 'image') {
par_elem = document.createElement('img');
par_elem.src = par_key.url;
} else if (key === 'bullet_list') {
par_elem = document.createElement('ul');
for (let bullet of par_key) {
par_html = parser.parseFromString('<li>' + DOMPurify.sanitize(bullet) + '</li>', 'text/html');
par_li = par_html.querySelector('li');
let bullet_link = par_li.querySelector('a');
if (bullet_link && bullet_link.href && !bullet_link.innerText)
bullet_link.innerText = bullet_link.href;
par_elem.appendChild(par_li);
}
} else if (key === 'streamone') {
if (!streamone) {
let streamone_script = document.createElement('script');
streamone_script.setAttribute('src', 'https://shared.mediahuis.be/videoplayers/mediahuis/video-theoplayer.js?v=20210629T080526');
streamone_script.setAttribute('defer', true);
streamone_script.setAttribute('crossorigin', 'anonymous');
if (head)
head.appendChild(streamone_script);
streamone = true;
}
let par_key_id = DOMPurify.sanitize(par_key.id);
par_html = parser.parseFromString('<div id="json_id"><div class="gva-6c6ea21_marginbottom5 gva-28c280e9_contentwrapper"><div class="gva-6c6ea21_marginbottom4"><div class="gva-6c6ea21_marginbottom0"><div class="gva-e5b9f66a_root" data-testid="embed-video"><svg class="gva-e5b9f66a_placeholder" viewBox="0 0 16 9" aria-hidden="true"></svg><div><div id="video-player-' + par_key_id + '" style="width:100%;" data-video-embed-id="' + par_key_id + '" data-video-target-id="video-player-' + par_key_id + '" data-video-brand="gva" class="js-theoplayer-placeholder"></div></div></div></div></div>', 'text/html');
par_elem = par_html.querySelector('div');
} else if (key === 'legacy-ml') {
par_html = parser.parseFromString(DOMPurify.sanitize(par_key), 'text/html');
par_elem = par_html.querySelector('div');
if (!flourish && par_key.includes('flourish.studio')) {
let flourish_script = document.createElement('script');
flourish_script.setAttribute('src', 'https://public.flourish.studio/resources/embed.js');
if (head)
head.appendChild(flourish_script);
flourish = true;
}
} else {
console.log(key + ': ' + par_key);
par_html = parser.parseFromString('<p>' + DOMPurify.sanitize(par_key) + '</p>', 'text/html');
par_elem = par_html.querySelector('p');
}
if (!['streamone', 'legacy-ml'].includes(key))
par_elem.setAttribute('style', 'font-size: 16px;');
div_content.appendChild(par_elem);
}
}
}
}
});
window.setTimeout(function () {
let overlay = document.querySelector('div.cj-root');
removeDOMElement(overlay);
let noscroll = document.querySelector('html.is-dialog-active');
if (noscroll)
noscroll.classList.remove('is-dialog-active');
}, 500); // Delay (in milliseconds)
}
else if (matchDomain('knack.be')) {
let paywall = document.querySelector('.rmgPaywall');
if (paywall) {

View file

@ -210,7 +210,6 @@
"*://*.griffithreview.com/*",
"*://*.groene.nl/*",
"*://*.grubstreet.com/*",
"*://*.gva.be/*",
"*://*.gympietimes.com.au/*",
"*://*.haaretz.co.il/*",
"*://*.haaretz.com/*",
@ -561,5 +560,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.3.7.0"
"version": "2.3.7.1"
}

View file

@ -20,7 +20,7 @@
<h2>Custom Sites</h2>
<div style="width:90%;">
To add a new site, enter an unique title/domain (without www.), select options for useragent (like Googlebot)/block Javascript (block on (sub)domain(s) of site and/or external domains) and/or set referer (ignored when Googlebot is set).<br>
Custom sites are enabled automatically in <small><button><a href="options.html" style="text-decoration:none;color:inherit">Options</a></button></small> (cookies will be removed by default unless you enable allow_cookies).<br>
Custom sites are enabled automatically in <small><button><a href="options.html" style="text-decoration:none;color:inherit">Options</a></button></small> (cookies will be removed by default unless you enable allow_cookies; cookie settings for default sites are ignored).<br>
If you want to use custom sites (for non-listed sites) enable it in <small><button><a href="optin/opt-in.html" style="text-decoration:none;color:inherit">Opt-in</a></button></small>
<strong>Custom sites enabled: <span id="custom-enabled"></span></strong><br>
You can also just request permissions for the custom sites you added yourself (below).<br>

View file

@ -86,7 +86,6 @@ var defaultSites =
"Freie Presse": "freiepresse.de",
"Funke Mediengruppe": "###_de_funke_medien",
"Gannett Group (local USA Today) (opt-in to custom sites)": "###_usa_gannett",
"Gazet van Antwerpen": "gva.be",
"GElocal.it": "gelocal.it",
"GenomeWeb": "genomeweb.com",
"Gestión": "gestion.pe",