diff --git a/xpfe/browser/resources/content/nsBrowserStatusHandler.js b/xpfe/browser/resources/content/nsBrowserStatusHandler.js index 886de739da8..ea91812b3a6 100644 --- a/xpfe/browser/resources/content/nsBrowserStatusHandler.js +++ b/xpfe/browser/resources/content/nsBrowserStatusHandler.js @@ -170,11 +170,6 @@ nsBrowserStatusHandler.prototype = this.statusTextField.label = text; }, - mimeTypeIsTextBased : function(contentType) - { - return /^text\/|\+xml$/.test(contentType); - }, - onLinkIconAvailable : function(aHref) { if (gProxyFavIcon && pref.getBoolPref("browser.chrome.site_icons")) { @@ -228,6 +223,7 @@ nsBrowserStatusHandler.prototype = this.stopButton.disabled = false; this.stopMenu.removeAttribute('disabled'); this.stopContext.removeAttribute('disabled'); + this.isImage.removeAttribute('disabled'); // Initialize the progress stuff... this.useRealProgressFlag = false; @@ -262,9 +258,7 @@ nsBrowserStatusHandler.prototype = this.setDefaultStatus(msg); try { ctype = aRequest.QueryInterface(nsIChannel).contentType; - if (this.mimeTypeIsTextBased(ctype)) - this.isImage.removeAttribute('disabled'); - else + if (ctype.match(/^image\//)) this.isImage.setAttribute('disabled', 'true'); } catch (e) {} @@ -309,12 +303,6 @@ nsBrowserStatusHandler.prototype = location = ""; } - // Disable menu entries for images, enable otherwise - if (this.mimeTypeIsTextBased(content.document.contentType)) - this.isImage.removeAttribute('disabled'); - else - this.isImage.setAttribute('disabled', 'true'); - // We should probably not do this if the value has changed since the user // searched // Update urlbar only if a new page was loaded on the primary content area