summaryrefslogtreecommitdiffstats
path: root/application/palemoon/base/content/browser.js
diff options
context:
space:
mode:
Diffstat (limited to 'application/palemoon/base/content/browser.js')
-rw-r--r--application/palemoon/base/content/browser.js32
1 files changed, 10 insertions, 22 deletions
diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js
index 8b3fa0b4f..cdf139bbb 100644
--- a/application/palemoon/base/content/browser.js
+++ b/application/palemoon/base/content/browser.js
@@ -65,6 +65,9 @@ XPCOMUtils.defineLazyGetter(window, "gFindBar", function() {
return findbar;
});
+XPCOMUtils.defineLazyModuleGetter(this, "BrowserUtils",
+ "resource://gre/modules/BrowserUtils.jsm");
+
XPCOMUtils.defineLazyGetter(this, "gPrefService", function() {
return Services.prefs;
});
@@ -3426,26 +3429,6 @@ function updateCharacterEncodingMenuState()
}
}
-/**
- * Returns true if |aMimeType| is text-based, false otherwise.
- *
- * @param aMimeType
- * The MIME type to check.
- *
- * If adding types to this function, please also check the similar
- * function in findbar.xml
- */
-function mimeTypeIsTextBased(aMimeType)
-{
- return aMimeType.startsWith("text/") ||
- aMimeType.endsWith("+xml") ||
- aMimeType == "application/x-javascript" ||
- aMimeType == "application/javascript" ||
- aMimeType == "application/json" ||
- aMimeType == "application/xml" ||
- aMimeType == "mozilla.application/cached-xul";
-}
-
var XULBrowserWindow = {
// Stored Status, Link and Loading values
status: "",
@@ -3669,7 +3652,7 @@ var XULBrowserWindow = {
this.setDefaultStatus(msg);
// Disable menu entries for images, enable otherwise
- if (!gMultiProcessBrowser && content.document && mimeTypeIsTextBased(content.document.contentType))
+ if (!gMultiProcessBrowser && content.document && BrowserUtils.mimeTypeIsTextBased(content.document.contentType))
this.isImage.removeAttribute('disabled');
else
this.isImage.setAttribute('disabled', 'true');
@@ -3717,7 +3700,7 @@ var XULBrowserWindow = {
}
// Disable menu entries for images, enable otherwise
- if (!gMultiProcessBrowser && content.document && mimeTypeIsTextBased(content.document.contentType))
+ if (!gMultiProcessBrowser && content.document && BrowserUtils.mimeTypeIsTextBased(content.document.contentType))
this.isImage.removeAttribute('disabled');
else
this.isImage.setAttribute('disabled', 'true');
@@ -3815,11 +3798,16 @@ var XULBrowserWindow = {
gFindBar.close();
}
+ // XXX
+ // See: https://github.com/MoonchildProductions/Pale-Moon/issues/364
+ // An actual preference: findbar.highlightAll
+ /*
if (!(gPrefService.getBoolPref("accessibility.typeaheadfind.highlightallremember") ||
gPrefService.getBoolPref("accessibility.typeaheadfind.highlightallbydefault"))) {
// fix bug 253793 - turn off highlight when page changes
gFindBar.getElement("highlight").checked = false;
}
+ */
}
}
UpdateBackForwardCommands(gBrowser.webNavigation);