diff --git a/changelog.txt b/changelog.txt index 7b96cf8..0546e96 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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 diff --git a/contentScript.js b/contentScript.js index 4455080..263167a 100755 --- a/contentScript.js +++ b/contentScript.js @@ -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')) { diff --git a/contentScript_once.js b/contentScript_once.js index 754c049..13e07e3 100644 --- a/contentScript_once.js +++ b/contentScript_once.js @@ -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) diff --git a/custom/manifest.json b/custom/manifest.json index faf9302..2d9f5e7 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -24,7 +24,8 @@ "incognito": "split", "content_scripts": [{ "matches": [ - "*://*.nationalgeographic.com/*" + "*://*.nationalgeographic.com/*", + "*://*.nyteknik.se/*" ], "run_at": "document_start", "js": ["contentScript_once.js"] @@ -38,5 +39,5 @@ "webRequestBlocking", "" ], - "version": "2.3.5.5" + "version": "2.3.5.6" } \ No newline at end of file diff --git a/manifest.json b/manifest.json index 321d986..16d2236 100755 --- a/manifest.json +++ b/manifest.json @@ -27,7 +27,8 @@ ], "content_scripts": [{ "matches": [ - "*://*.nationalgeographic.com/*" + "*://*.nationalgeographic.com/*", + "*://*.nyteknik.se/*" ], "run_at": "document_start", "js": ["contentScript_once.js"] @@ -541,5 +542,5 @@ "*://*.wallkit.net/*", "*://*.wsj.net/*" ], - "version": "2.3.5.5" + "version": "2.3.5.6" } \ No newline at end of file