diff --git a/browser/base/content/tab-content.js b/browser/base/content/tab-content.js index faade1aed..839258793 100644 --- a/browser/base/content/tab-content.js +++ b/browser/base/content/tab-content.js @@ -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; diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index edc80ed42..13ffe6113 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -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);