Fix Madsack Mediengruppe (custom flex sites)

This commit is contained in:
magnolia1234 2023-02-22 17:26:02 +01:00
parent 59f2997bc9
commit 27d84c3e39
7 changed files with 13 additions and 9 deletions

View File

@ -802,7 +802,7 @@ if (typeof browser !== 'object') {
}
}
var set_var_sites = ['cz.de', 'nzherald.co.nz', 'theglobeandmail.com'].concat(de_madsack_domains, de_madsack_custom_domains);
var set_var_sites = ['cz.de', 'nzherald.co.nz', 'theglobeandmail.com'].concat(de_madsack_domains);
function runOnTab_once_var(tab) {
let tabId = tab.id;
let url = tab.url;
@ -1331,6 +1331,9 @@ ext_api.runtime.onMessage.addListener(function (message, sender) {
rules = Object.values(defaultSites).filter(x => x.domain === group)[0];
if (group === '###_usa_gannett')
rules.amp_unhide = 1;
else if (group === '###_de_madsack')
if (!set_var_sites.includes(custom_domain))
set_var_sites.push(custom_domain);
}
if (rules) {
customAddRules(custom_domain, rules);

View File

@ -7,6 +7,7 @@ Add LosAndes.com.ar (Grupo Clarin)
Remove Hln.be (fix obsolete)
Remove Lequipe.fr (fix obsolete)
Fix Harper's Magazine (modal)
Fix Madsack Mediengruppe (custom flex sites)
Fix NK News (pro)
Fix Quartz (newsletter)

View File

@ -10,7 +10,6 @@ var ca_gcm_domains = ['lesoleil.com'].concat(['latribune.ca', 'lavoixdelest.ca',
var ca_torstar_domains = ['niagarafallsreview.ca', 'stcatharinesstandard.ca', 'thepeterboroughexaminer.com', 'therecord.com', 'thespec.com', 'thestar.com', 'wellandtribune.ca'];
var de_funke_medien_domains = ['abendblatt.de', 'braunschweiger-zeitung.de', 'morgenpost.de', 'nrz.de', 'otz.de', 'thueringer-allgemeine.de', 'tlz.de', 'waz.de', 'wp.de', 'wr.de'];
var de_madsack_domains = ['haz.de', 'kn-online.de', 'ln-online.de', 'lvz.de', 'maz-online.de', 'neuepresse.de', 'ostsee-zeitung.de', 'rnd.de'];
var de_madsack_custom_domains = ['dnn.de', 'gnz.de', 'goettinger-tageblatt.de', 'op-marburg.de', 'paz-online.de', 'siegener-zeitung.de', 'sn-online.de', 'waz-online.de'];
var de_vrm_domains = ['allgemeine-zeitung.de', 'echo-online.de', 'wiesbadener-kurier.de'];
var de_westfalen_medien_domains = ['muensterschezeitung.de', 'westfalen-blatt.de', 'wn.de'];
var es_epiberica_domains = ['diariodemallorca.es', 'eldia.es', 'epe.es', 'farodevigo.es', 'informacion.es', 'laprovincia.es', 'levante-emv.com', 'lne.es', 'mallorcazeitung.es'];
@ -975,7 +974,7 @@ else if (matchDomain(de_funke_medien_domains) || document.querySelector('a[href=
sessionStorage.setItem('deobfuscate', 'true');
}
else if (matchDomain(de_madsack_domains) || matchDomain(de_madsack_custom_domains)) {
else if (matchDomain(de_madsack_domains) || document.querySelector('link[href*=".rndtech.de/"]')) {
// plus code in contentScript_once_var.js (timing)
if (!window.location.search.startsWith('?outputType=valid_amp')) {
let ads = document.querySelectorAll('div[class^="Adstyled__AdWrapper"]');

View File

@ -1,8 +1,10 @@
//'use strict';
var ext_api = (typeof browser === 'object') ? browser : chrome;
var hostname = window.location.hostname;
var de_madsack_domains = ['haz.de', 'kn-online.de', 'ln-online.de', 'lvz.de', 'maz-online.de', 'neuepresse.de', 'ostsee-zeitung.de', 'rnd.de'];
var de_madsack_custom_domains = ['dnn.de', 'gnz.de', 'goettinger-tageblatt.de', 'op-marburg.de', 'paz-online.de', 'siegener-zeitung.de', 'sn-online.de', 'waz-online.de'];
if (hostname.match(/\.de$/)) {
if (matchDomain('cz.de')) {
function cz_unhide(node) {
@ -14,7 +16,7 @@ if (matchDomain('cz.de')) {
waitDOMElement('div#erasmo', 'DIV', cz_unhide);
}
else if (matchDomain(de_madsack_domains) || matchDomain(de_madsack_custom_domains)) {
else if (matchDomain(de_madsack_domains) || document.querySelector('link[href*=".rndtech.de/"]')) {
function madsack_main() {
let done = false;
for (let n = 0; n < 10; n++) {
@ -29,7 +31,7 @@ else if (matchDomain(de_madsack_domains) || matchDomain(de_madsack_custom_domain
insert_script(madsack_main);
}
else if (matchDomain('nzherald.co.nz')) {
} else if (matchDomain('nzherald.co.nz')) {
function nzherald_main() {
let done = false;
for (let n = 0; n < 10; n++) {

View File

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.0.6.3"
"version": "3.0.6.4"
}

View File

@ -739,5 +739,5 @@
"*://*.wallkit.net/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.0.6.3"
"version": "3.0.6.4"
}

View File

@ -2439,7 +2439,6 @@ expandSiteRules(defaultSites);
// grouped domains (background)
var au_news_corp_domains = grouped_sites['###_au_news_corp'];
var de_madsack_domains = grouped_sites['###_de_madsack'];
var de_madsack_custom_domains = ['dnn.de', 'gnz.de', 'goettinger-tageblatt.de', 'op-marburg.de', 'paz-online.de', 'siegener-zeitung.de', 'sn-online.de', 'waz-online.de'];
var es_grupo_vocento_domains = grouped_sites['###_es_grupo_vocento'];
var nl_mediahuis_region_domains = grouped_sites['###_nl_mediahuis_region'];
var no_nhst_media_domains = grouped_sites['###_no_nhst_media'];