Fix NyTeknik (images)

merge-requests/2/head
magnolia1234 3 years ago
parent 31cc550610
commit bc719a40e1

@ -8,6 +8,7 @@ Fix Gestion & El Comercio (Peru)
Fix Handelsblatt (only non-premium articles)
Fix Il Fatto Quotidiano
Fix Il Secolo XIX (mobile)
Fix NyTeknik (images)
Fix NzHerald
Fix shz.de & svz.de

@ -2306,12 +2306,10 @@ else if (matchDomain('nybooks.com')) {
}
else if (matchDomain('nyteknik.se')) {
// plus code in contentScript_once.js
let locked_article = document.querySelector('div.locked-article');
if (locked_article)
locked_article.classList.remove('locked-article');
let hidden_images = document.querySelectorAll('img[src=""][data-proxy-image]');
for (let hidden_image of hidden_images)
hidden_image.setAttribute('src', hidden_image.getAttribute('data-proxy-image').replace('_320', '_640'));
}
else if (matchDomain('nytimes.com')) {

@ -12,6 +12,14 @@ if (matchDomain('nationalgeographic.com')) {
waitDOMElement('div[id^="fittPortal"]', 'DIV', natgeo_func, false);
}
else if (matchDomain('nyteknik.se')) {
window.setTimeout(function () {
let hidden_images = document.querySelectorAll('img[src=""][data-proxy-image]');
for (let hidden_image of hidden_images)
hidden_image.setAttribute('src', hidden_image.getAttribute('data-proxy-image').replace('_320', '_640'));
}, 2000); // Delay (in milliseconds)
}
function matchDomain(domains, hostname) {
var matched_domain = false;
if (!hostname)

@ -39,7 +39,8 @@
],
"content_scripts": [{
"matches": [
"*://*.nationalgeographic.com/*"
"*://*.nationalgeographic.com/*",
"*://*.nyteknik.se/*"
],
"run_at": "document_start",
"js": ["contentScript_once.js"]
@ -553,5 +554,5 @@
"*://*.wallkit.net/*",
"*://*.wsj.net/*"
],
"version": "2.3.5.5"
"version": "2.3.5.6"
}
Loading…
Cancel
Save