better solution for #654

This commit is contained in:
Cameron Kaiser 2022-04-30 17:44:09 -07:00
parent 6cae6ac238
commit 0a9d355bee
1 changed files with 5 additions and 2 deletions

View File

@ -401,10 +401,13 @@ var AboutReaderListener = {
// TenFourFox issue 654: defeat lozad.js lazy image loading. // TenFourFox issue 654: defeat lozad.js lazy image loading.
Array.forEach(content.document.getElementsByTagName('img'), Array.forEach(content.document.getElementsByTagName('img'),
function(i) { function(i) {
let j;
try { try {
// Convert data-src to src. // Convert data-src to src.
if (i.getAttribute("data-src")) { j = i.getAttribute("data-src");
i.src = i.getAttribute("data-src"); if (j) {
i.src = j;
i.setAttribute("data-loaded") = "true"; i.setAttribute("data-loaded") = "true";
} }
} catch(e) { } } catch(e) { }