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