Add BusinessAM.be

merge-requests/17/head
magnolia1234 6 months ago
parent 5b142b864c
commit a57708c6d9

@ -714,6 +714,7 @@ Grouped in options:\
[La Nuova Sardegna](https://www.lanuovasardegna.it)*
##### Netherlands/Flanders
[Business AM](https://businessam.be) -
[De Tijd](https://www.tijd.be) -
[Doorbraak](https://doorbraak.be) -
[Financieele Dagblad](https://fd.nl) -

@ -4,6 +4,7 @@ Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywal
Post-release
Add Bild.de (link to archive.is)
Add BusinessAM.be
Add Rp.pl
Remove Bnn.de (fix obsolete)
Remove LeTemps.ch (fix obsolete)

@ -709,9 +709,7 @@ else if (matchDomain(['beobachter.ch', 'handelszeitung.ch'])) {
sub_elem = content_new.querySelector('div');
let iframe = sub_elem.querySelector('iframe[width]');
if (iframe) {
let ratio = iframe.width / 640;
if (mobile)
ratio = iframe.width / 320;
let ratio = iframe.width / (mobile ? 320 : 640);
iframe.width = iframe.width / ratio;
iframe.height = iframe.height / ratio;
}
@ -721,9 +719,7 @@ else if (matchDomain(['beobachter.ch', 'handelszeitung.ch'])) {
sub_elem.src = par_elem.origin;
sub_elem.alt = par_elem.alt;
if (par_elem.width) {
let ratio = par_elem.width / 640;
if (mobile)
ratio = par_elem.width / 320;
let ratio = par_elem.width / (mobile ? 320 : 640);
sub_elem.width = par_elem.width / ratio;
sub_elem.height = par_elem.height / ratio;
}
@ -1470,9 +1466,7 @@ if (matchDomain('etc.se')) {
let video_iframes = document.querySelectorAll('div.embed-block > iframe[width][height]');
for (let elem of video_iframes) {
if (elem.width > 1000) {
let ratio = elem.width / 640;
if (window.navigator.userAgent.toLowerCase().includes('mobile'))
ratio = elem.width / 320;
let ratio = elem.width / (mobile ? 320 : 640);
elem.width = elem.width / ratio;
elem.height = elem.height / ratio;
}
@ -2398,6 +2392,35 @@ if (matchDomain(be_groupe_ipm_domains)) {
hideDOMElement(...ads);
}
else if (matchDomain('businessam.be')) {
let paywall = document.querySelector('div.paywall');
if (paywall && dompurify_loaded) {
removeDOMElement(paywall);
let article = document.querySelector('div.text-gradient');
if (article) {
let scripts = document.querySelectorAll('script:not([src]):not([type])');
let content_script;
for (let script of scripts) {
if (script.text.match(/window\.fullcontent64\s?=\s?"/)) {
content_script = script;
break;
}
}
if (content_script) {
try {
let content = decode_utf8(atob(content_script.text.split(/window\.fullcontent64\s?=\s?"/)[1].split('";')[0]));
let parser = new DOMParser();
let doc = parser.parseFromString('<div>' + DOMPurify.sanitize(content, dompurify_options) + '</div>', 'text/html');
let content_new = doc.querySelector('div');
article.parentNode.replaceChild(content_new, article);
} catch (err) {
console.log(err);
}
}
}
}
}
else if (matchDomain('doorbraak.be')) {
let paywall_sel = 'div.paywall';
let paywall = document.querySelector(paywall_sel);

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.4.7.6"
"version": "3.4.7.7"
}

@ -73,13 +73,6 @@
"domain": "bt.no",
"useragent": "facebookbot"
},
"Businessam.be": {
"add_ext_link": "div.paywall|div.entry-content",
"add_ext_link_type": "archive.is",
"allow_cookies": 1,
"cs_code": "[{\"cond\":\"div.text-gradient\", \"rm_class\":\"text-gradient\"}]",
"domain": "businessam.be"
},
"Businessinsider.de": {
"add_ext_link": "div.piano-article__paywall|div.piano-article__content",
"add_ext_link_type": "google_search_tool",
@ -202,12 +195,6 @@
"block_regex": "\\.eviemagazine\\.com\\/api\\/trpc\\/post\\.paywall",
"domain": "eviemagazine.com"
},
"Ewmagazine.nl": {
"add_ext_link": "div.paywall|div.entry-content",
"add_ext_link_type": "archive.is",
"allow_cookies": 1,
"domain": "ewmagazine.nl"
},
"Faithfullymagazine.com": {
"allow_cookies": 1,
"domain": "faithfullymagazine.com",
@ -285,6 +272,9 @@
"block_regex": "\\.hbook\\.com\\/.+\\/js\\/metering\\.js",
"domain": "hbook.com"
},
"Hbrtaiwan.com": {
"domain": "hbrtaiwan.com"
},
"Heidi.news": {
"allow_cookies": 1,
"block_regex": "\\.piano\\.io",

@ -125,6 +125,7 @@
"*://*.britannica.com/*",
"*://*.buffalonews.com/*",
"*://*.business-standard.com/*",
"*://*.businessam.be/*",
"*://*.businessinsider.com/*",
"*://*.businessoffashion.com/*",
"*://*.businesspost.ie/*",
@ -822,5 +823,5 @@
"*://archive.vn/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.4.7.6"
"version": "3.4.7.7"
}

@ -295,6 +295,11 @@ var defaultSites = {
block_regex: /\.tinypass\.com\//,
cs_dompurify: 1
},
"BusinessAM.be": {
domain: "businessam.be",
allow_cookies: 1,
cs_dompurify: 1
},
"Business Insider": {
domain: "businessinsider.com",
allow_cookies: 1,

Loading…
Cancel
Save