Add Knack.be

This commit is contained in:
magnolia1234 2020-06-26 19:56:58 +02:00
parent 1a8d5f6aef
commit 2732dd7fe5
5 changed files with 20 additions and 0 deletions

View file

@ -202,6 +202,7 @@ Install add-on by downloading xpi-file.
[Groene Amsterdammer](https://www.groene.nl) - [Groene Amsterdammer](https://www.groene.nl) -
[Het Financieel Dagblad](https://fd.nl) - [Het Financieel Dagblad](https://fd.nl) -
[Humo.be](https://www.humo.be) - [Humo.be](https://www.humo.be) -
[Knack.be](https://www.knack.be) -
[Leeuwarder Courant](https://www.lc.nl) - [Leeuwarder Courant](https://www.lc.nl) -
[NRC Handelsblad](https://www.nrc.nl) - [NRC Handelsblad](https://www.nrc.nl) -
[Parool](https://www.parool.nl) - [Parool](https://www.parool.nl) -

View file

@ -44,6 +44,7 @@ var allow_cookies = [
'independent.ie', 'independent.ie',
'inkl.com', 'inkl.com',
'intelligentinvestor.com.au', 'intelligentinvestor.com.au',
'knack.be',
'lc.nl', 'lc.nl',
'lrb.co.uk', 'lrb.co.uk',
'mexiconewsdaily.com', 'mexiconewsdaily.com',
@ -178,6 +179,7 @@ var blockedRegexes = {
'ilmessaggero.it': /(utils\.cedsdigital\.it\/js\/PaywallMeter\.js|static\.viralize\.tv\/viralize_player)/, 'ilmessaggero.it': /(utils\.cedsdigital\.it\/js\/PaywallMeter\.js|static\.viralize\.tv\/viralize_player)/,
'independent.ie': /cdn\.flip-pay\.com\/clients\/inm\/flip-pay\.js/, 'independent.ie': /cdn\.flip-pay\.com\/clients\/inm\/flip-pay\.js/,
'inquirer.com': /.+\.tinypass\.com\/.+/, 'inquirer.com': /.+\.tinypass\.com\/.+/,
'knack.be': /.+\.knack\.be\/js\/responsive\/rmgModal\.js/,
'ladepeche.fr': /.+\.poool\.fr\/.+/, 'ladepeche.fr': /.+\.poool\.fr\/.+/,
'lastampa.it': /.+\.repstatic\.it\/minify\/sites\/lastampa\/.+\/config\.cache\.php\?name=social_js/, 'lastampa.it': /.+\.repstatic\.it\/minify\/sites\/lastampa\/.+\/config\.cache\.php\?name=social_js/,
'lc.nl': /.+\.evolok\.net\/.+\/authorize\/.+/, 'lc.nl': /.+\.evolok\.net\/.+\/authorize\/.+/,

View file

@ -728,6 +728,20 @@ else if (matchDomain('slader.com')) {
}, 500); // Delay (in milliseconds) }, 500); // Delay (in milliseconds)
} }
else if (matchDomain('knack.be')) {
let paywall = document.querySelector('.rmgPaywall');
removeDOMElement(paywall);
let hidden_body = document.querySelector('div.rmgDetail-body div');
if (hidden_body) {
hidden_body.removeAttribute('class');
let body_text = hidden_body.innerText.replace(/(?:^|[\w\"\'])(\.|\?|!)(?=[A-Za-zÀ-ÿ\"\']{2,})/gm, "$&\n\n");
hidden_body.innerText = body_text;
let intro_par = document.querySelector('div.rmgDetail-body p');
if (intro_par && intro_par.innerText.length > 200)
removeDOMElement(intro_par);
}
}
// General Functions // General Functions
function removeDOMElement(...elements) { function removeDOMElement(...elements) {
for (let element of elements) { for (let element of elements) {

View file

@ -120,6 +120,7 @@
"*://*.irishtimes.com/*", "*://*.irishtimes.com/*",
"*://*.japantimes.co.jp/*", "*://*.japantimes.co.jp/*",
"*://*.journalnow.com/*", "*://*.journalnow.com/*",
"*://*.knack.be/*",
"*://*.labusinessjournal.com/*", "*://*.labusinessjournal.com/*",
"*://*.ladepeche.fr/*", "*://*.ladepeche.fr/*",
"*://*.lanacion.com.ar/*", "*://*.lanacion.com.ar/*",
@ -181,6 +182,7 @@
"*://*.seattletimes.com/*", "*://*.seattletimes.com/*",
"*://*.seekingalpha.com/*", "*://*.seekingalpha.com/*",
"*://*.sfchronicle.com/*", "*://*.sfchronicle.com/*",
"*://*.slader.com/*",
"*://*.sloanreview.mit.edu/*", "*://*.sloanreview.mit.edu/*",
"*://*.smh.com.au/*", "*://*.smh.com.au/*",
"*://*.sofrep.com/*", "*://*.sofrep.com/*",

View file

@ -68,6 +68,7 @@ var defaultSites =
"Inkl": "inkl.com", "Inkl": "inkl.com",
"Intelligent Investor": "intelligentinvestor.com.au", "Intelligent Investor": "intelligentinvestor.com.au",
"Irish Independent": "independent.ie", "Irish Independent": "independent.ie",
"Knack.be": "knack.be",
"L'Écho": "lecho.be", "L'Écho": "lecho.be",
"L'Opinion": "lopinion.fr", "L'Opinion": "lopinion.fr",
"La Dépêche": "ladepeche.fr", "La Dépêche": "ladepeche.fr",