mirror of
https://github.com/classilla/tenfourfox.git
synced 2025-01-03 20:30:00 +00:00
#654: lozad and yt workarounds
This commit is contained in:
parent
861ae8f628
commit
5e969c18d9
@ -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;
|
||||
|
||||
|
@ -438,6 +438,8 @@ nsHttpHandler::AddStandardRequestHeaders(nsHttpHeaderArray *request,
|
||||
!hostLine.EqualsLiteral("imgur.com") &&
|
||||
!hostLine.EqualsLiteral("github.com") &&
|
||||
!hostLine.EqualsLiteral("gist.github.com") &&
|
||||
!hostLine.EqualsLiteral("youtube.com") &&
|
||||
!hostLine.EqualsLiteral("www.youtube.com") &&
|
||||
1)) {
|
||||
rv = request->SetHeader(nsHttp::User_Agent, UserAgent(),
|
||||
false, nsHttpHeaderArray::eVarietyDefault);
|
||||
|
Loading…
Reference in New Issue
Block a user