Fix Belfast Telegraph/Independent.ie

merge-requests/16/head
magnolia1234 7 months ago
parent 5f8fe7ed20
commit 7665032284

@ -6,6 +6,7 @@ Post-release
Add Haymarket Media Group (opt-in to custom sites)
Add Haymarket Medical Network (opt-in to custom sites)
Remove Observador.pt (fix obsolete)
Fix Belfast Telegraph/Independent.ie
Fix Bloomberg (overlay)
Fix Groupe Rossel (link to archive.is)
Fix Telegraaf.nl (images)

@ -2602,8 +2602,8 @@ else if (matchDomain('telegraaf.nl')) {
let placeholders = article_new.querySelectorAll('div.TeaserImage__placeholder');
for (let elem of placeholders)
elem.removeAttribute('class');
let newsletter = article_new.querySelector('div.NewsletterForm');
removeDOMElement(newsletter);
let media = article_new.querySelectorAll('div.NewsletterForm, div.DetailArticleVideo');
removeDOMElement(...media);
div_main.appendChild(article_new);
} else {
let json_script = getArticleJsonScript();
@ -2687,14 +2687,12 @@ else if (matchDomain('autocar.co.uk')) {
}
else if (matchDomain(['belfasttelegraph.co.uk', 'independent.ie'])) {
let flip_pay = document.querySelector('div#flip-pay[style]');
if (flip_pay && dompurify_loaded) {
let flip_pay = document.querySelector('div#flip-pay');
if (flip_pay && flip_pay.hasChildNodes() && dompurify_loaded) {
let content = document.querySelector('script[data-fragment-type="ArticleContent"]');
if (content) {
window.setTimeout(function () {
let fade = document.querySelector('div[class*="_fadetowhite"]');
removeDOMElement(flip_pay, fade);
}, 500);
let fade = document.querySelector('div[class*="_fadetowhite"]');
removeDOMElement(flip_pay, fade);
let intro = document.querySelector('div > div[data-auth-intro="article"]');
if (intro) {
let intro_par = intro.querySelector('p[class]');
@ -2745,7 +2743,7 @@ else if (matchDomain(['belfasttelegraph.co.uk', 'independent.ie'])) {
elem.appendChild(document.createElement('br'));
}
}
} else if (!['ad', 'streamone'].includes(type)) {
} else if (!['ad', 'quote', 'streamone'].includes(type)) {
let html = parser.parseFromString('<p class="' + intro_par_class + '">' + DOMPurify.sanitize(item, {ADD_TAGS: ['iframe']}) + '</p>', 'text/html');
elem = html.querySelector('p');
if (!['p', 'subhead', 'legacy-ml'].includes(type)) {
@ -2765,8 +2763,7 @@ else if (matchDomain(['belfasttelegraph.co.uk', 'independent.ie'])) {
}
}
}
} else
flip_pay.removeAttribute('style');
}
}
let ads = document.querySelectorAll('div[id^="ad_article"]');
hideDOMElement(...ads);
@ -2993,7 +2990,7 @@ else if (matchDomain('stylist.co.uk')) {
}
} else if (!['newsletter_signup', 'pull-quote'].includes(par.acf_fc_layout))
console.log(par);
if (elem.hasChildNodes) {
if (elem.hasChildNodes()) {
elem.style = 'font-family: "Source Serif Pro"; font-size: 20px; line-height: 34px;';
article.appendChild(elem);
}
@ -5052,7 +5049,7 @@ else if (matchDomain(['thejuggernaut.com', 'jgnt.co'])) {
} else {
console.log(par);
}
if (elem.hasChildNodes) {
if (elem.hasChildNodes()) {
article.appendChild(document.createElement('br'));
article.appendChild(elem);
}
@ -5194,7 +5191,7 @@ else if (matchDomain('theverge.com')) {
}
} else
console.log(par);
if (elem.hasChildNodes)
if (elem.hasChildNodes())
article.appendChild(elem);
}
}

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.4.1.4"
"version": "3.4.1.5"
}

@ -670,6 +670,11 @@
"cs_code": "[{\"cond\":\"div.c-memberships-message\", \"rm_elem\":1, \"elems\":[{\"cond\":\"body.access-restricted\",\"rm_class\":\"access-restricted\"}]}]",
"domain": "stateaffairs.com"
},
"Stripes.com": {
"allow_cookies": 1,
"block_regex": "js\\.pelcro\\.com",
"domain": "stripes.com"
},
"Suedkurier.de": {
"add_ext_link": "aside.article-paywall|section.article-content",
"add_ext_link_type": "archive.is",

@ -793,7 +793,6 @@
"*://*.cedsdigital.it/*",
"*://*.corriereobjects.it/*",
"*://*.emol.cl/*",
"*://*.flip-pay.com/*",
"*://*.gitlab.com/magnolia1234/*",
"*://*.hadrianpaywall.com/*",
"*://*.kinja-static.com/*",
@ -807,5 +806,5 @@
"*://*.wyleex.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.4.1.4"
"version": "3.4.1.5"
}

@ -237,7 +237,6 @@ var defaultSites = {
"Belfast Telegraph": {
domain: "belfasttelegraph.co.uk",
allow_cookies: 1,
block_regex: /cdn\.flip-pay\.com\/clients\/.+\/flip-pay\.js/,
cs_dompurify: 1
},
"Beobachter.ch": {
@ -1175,7 +1174,6 @@ var defaultSites = {
"Irish Independent": {
domain: "independent.ie",
allow_cookies: 1,
block_regex: /cdn\.flip-pay\.com\/clients\/.+\/flip-pay\.js/,
cs_dompurify: 1
},
"Italia Oggi": {
@ -2075,7 +2073,8 @@ var defaultSites = {
},
"Telegraaf": {
domain: "telegraaf.nl",
allow_cookies: 1
allow_cookies: 1,
cs_dompurify: 1
},
"Télérama": {
domain: "telerama.fr",
@ -2721,12 +2720,14 @@ var defaultSites = {
"Poool.fr": {
domain: "poool.fr",
allow_cookies: 1,
block_regex_general: /\.poool\.fr\//
block_regex_general: /\.poool\.fr\//,
excluded_domains: ["poool.fr"]
},
"Qiota": {
domain: "qiota.com",
allow_cookies: 1,
block_regex_general: /\.qiota\.com\/data/
block_regex_general: /\.qiota\.com\/data/,
excluded_domains: ["qiota.com"]
},
"Steady": {
domain: "steadyhq.com",

Loading…
Cancel
Save