mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-06-04 23:29:33 +00:00
a better idea for #583
This commit is contained in:
parent
74fd7b6d0d
commit
f0a4e76864
|
@ -375,13 +375,21 @@ var AboutReaderListener = {
|
||||||
onPaintWhenWaitedFor: function(forceNonArticle) {
|
onPaintWhenWaitedFor: function(forceNonArticle) {
|
||||||
this.cancelPotentialPendingReadabilityCheck();
|
this.cancelPotentialPendingReadabilityCheck();
|
||||||
|
|
||||||
|
let doc = content.document;
|
||||||
|
if (!doc) return;
|
||||||
|
|
||||||
// TenFourFox issue 583
|
// TenFourFox issue 583
|
||||||
// If we are always allowing reader mode, don't bother spending any time
|
// If we are always allowing reader mode, don't bother spending any time
|
||||||
// processing the page. But don't let just everything through.
|
// processing the page. But don't let just everything through.
|
||||||
if (!this.isAboutReader) {
|
if (!this.isAboutReader && this._alwaysAllowReaderMode) {
|
||||||
if (this._alwaysAllowReaderMode && !(content.document.documentURI.startsWith("about:"))) {
|
// This borrows a bit from isProbablyReaderable()
|
||||||
sendAsyncMessage("Reader:UpdateReaderButton", { isArticle: true });
|
if (!doc.mozSyntheticDocument &&
|
||||||
return;
|
doc instanceof doc.defaultView.HTMLDocument) {
|
||||||
|
let uri = Services.io.newURI(doc.location.href, null, null);
|
||||||
|
if (uri && Readerable.shouldCheckUri(uri)) {
|
||||||
|
sendAsyncMessage("Reader:UpdateReaderButton", { isArticle: true });
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user