Bug 1147487 - Don't try to reader-ize non-HTML documents. r=margaret, r=jaws, a=lmandel
This commit is contained in:
@@ -118,8 +118,12 @@ this.ReaderMode = {
|
||||
* @return boolean Whether or not we should show the reader mode button.
|
||||
*/
|
||||
isProbablyReaderable: function(doc) {
|
||||
let uri = Services.io.newURI(doc.location.href, null, null);
|
||||
// Only care about 'real' HTML documents:
|
||||
if (doc.mozSyntheticDocument || !(doc instanceof doc.defaultView.HTMLDocument)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let uri = Services.io.newURI(doc.location.href, null, null);
|
||||
if (!this._shouldCheckUri(uri)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user