Bug 1320900 - Do not show Reader View icon on error pages. r?sebastian draft
authorNevin Chen <cnevinchen@gmail.com>
Mon, 09 Jan 2017 07:12:50 +0800
changeset 457451 6e034f61b22726ccac11b9e41c6c5999ddcda643
parent 454750 8035839bfa1d4e542cc7a9abd45be3724ce97634
child 541474 003ce15eede85d242a654e8ebf49e07be35c8df9
push id40767
push userbmo:cnevinchen@gmail.com
push dateSun, 08 Jan 2017 23:13:33 +0000
reviewerssebastian
bugs1320900
milestone53.0a1
Bug 1320900 - Do not show Reader View icon on error pages. r?sebastian MozReview-Commit-ID: Cdn7battX68
mobile/android/chrome/content/content.js
--- a/mobile/android/chrome/content/content.js
+++ b/mobile/android/chrome/content/content.js
@@ -52,17 +52,19 @@ var AboutReaderListener = {
     }
   },
 
   get isAboutReader() {
     return content.document.documentURI.startsWith("about:reader");
   },
 
   get isErrorPage() {
-    return content.document.documentURI.startsWith("about:neterror");
+    return content.document.documentURI.startsWith("about:neterror") ||
+        content.document.documentURI.startsWith("about:certerror") ||
+        content.document.documentURI.startsWith("about:blocked");
   },
 
   handleEvent: function(aEvent) {
     if (aEvent.originalTarget.defaultView != content) {
       return;
     }
 
     switch (aEvent.type) {