mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-06-10 02:29:43 +00:00
lozad and yt workarounds
This commit is contained in:
parent
8e8607dd0b
commit
993dc6a76a
|
@ -396,6 +396,21 @@ var AboutReaderListener = {
|
|||
}
|
||||
break;
|
||||
case "DOMContentLoaded":
|
||||
// Post-load fixups can go here.
|
||||
|
||||
// TenFourFox issue 654: defeat lozad.js lazy image loading.
|
||||
Array.forEach(content.document.getElementsByTagName('img'),
|
||||
function(i) {
|
||||
try {
|
||||
// Convert data-src to src.
|
||||
if (i.getAttribute("data-src")) {
|
||||
i.src = i.getAttribute("data-src");
|
||||
i.setAttribute("data-loaded") = "true";
|
||||
}
|
||||
} catch(e) { }
|
||||
});
|
||||
|
||||
// Do this last.
|
||||
this.updateReaderButton();
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user