%commNotificationDTD; %globalNotificationDTD; ]> this null null window.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIWebNavigation) .QueryInterface(Ci.nsILoadContext) .usePrivateBrowsing "EnterInsecureMessage" 0 { Services.perms.add(this.activeBrowser.currentURI, "trackingprotection", Ci.nsIPermissionManager.ALLOW_ACTION); this.reloadPage(); } }]; } } else if (aState & nsIWebProgressListener.STATE_LOADED_MIXED_DISPLAY_CONTENT && Services.prefs.getBoolPref("security.warn_mixed_display_content")) { pref = "security.warn_mixed_display_content"; message = "MixedDisplayContentMessage"; priority = this.PRIORITY_WARNING_LOW; } else if (aState & nsIWebProgressListener.STATE_BLOCKED_MIXED_DISPLAY_CONTENT && Services.prefs.getBoolPref("security.warn_mixed_display_content")) { pref = "security.warn_mixed_display_content"; message = "BlockedDisplayContentMessage"; priority = this.PRIORITY_INFO_LOW; } if (this.lastMessage == message) return false; var box = this.getNotificationWithValue(this.lastMessage); if (box) box.close(); this.lastMessage = message; if (!Services.prefs.getBoolPref(pref)) return true; if ("goPreferences" in window) { buttons.push({ label: this._stringBundle.GetStringFromName("SecurityPreferences.label"), accessKey: this._stringBundle.GetStringFromName("SecurityPreferences.accesskey"), callback: function() { goPreferences(pane); return true; } }); } var text = this._stringBundle.GetStringFromName(message); box = this.appendNotification(text, message, null, priority, buttons); box.persistence = 1; box.timeout = Date.now() + 20000; // 20 seconds return true; ]]> null false "Foo Bar" // Do this by first stripping the numbers, etc. off the end, and // then removing "Plugin" (and then trimming to get rid of any // whitespace). Otherwise, something like "Java(TM) Plug-in // 1.7.0_07" gets mangled. var newName = aName.replace(/[\s\d\.\-\_\(\)]+$/, "").replace(/\bplug-?in\b/i, "").trim(); return newName; ]]> 0 install.addon.pendingOperations & tmp.AddonManager.PENDING_INSTALL)) { messageString = this._stringBundle.GetStringFromName("addonsInstalledNeedsRestart"); buttons.push({ label: this._stringBundle.GetStringFromName("addonInstallRestartButton"), accessKey: this._stringBundle.GetStringFromName("addonInstallRestartButton.accesskey"), callback: function () { BrowserUtils.restartApplication(); } }); } else { messageString = this._stringBundle.GetStringFromName("addonsInstalled"); } if ("toEM" in window) { buttons.push({ label: this._stringBundle.GetStringFromName("addonInstallManageButton"), accessKey: this._stringBundle.GetStringFromName("addonInstallManageButton.accesskey"), callback: function() { window.toEM("addons://list/extension"); } }); } var brandShortName = this._brandStringBundle.GetStringFromName("brandShortName"); messageString = tmp.PluralForm.get(installInfo.installs.length, messageString) .replace("#1", installInfo.installs[0].name) .replace("#2", installInfo.installs.length) .replace("#3", brandShortName); var priority = this.PRIORITY_WARNING_MEDIUM; this.appendNotification(messageString, notificationName, null, priority, buttons); ]]> false 1) { this.popupCount = browser.blockedPopups.length; } else { this.popupCount++; } this.playSoundForBlockedPopup(); this.notifyPopupCountChanged(); var tmp = {}; ChromeUtils.import("resource://gre/modules/PluralForm.jsm", tmp); if (Services.prefs.getBoolPref("privacy.popups.showBrowserMessage")) { var brandShortName = this._brandStringBundle.GetStringFromName("brandShortName"); var message = this._stringBundle.GetStringFromName("popupWarning.message"); message = tmp.PluralForm.get(this.popupCount, message) .replace("#1", brandShortName) .replace("#2", this.popupCount); var notification = this.getNotificationWithValue("popup-blocked"); if (notification) { notification.label = message; } else { var popupButtonText = this._stringBundle.GetStringFromName("popupWarningButton"); var popupButtonAccesskey = this._stringBundle.GetStringFromName("popupWarningButton.accesskey"); var buttons = [{ label: popupButtonText, accessKey: popupButtonAccesskey, popup: "popupNotificationMenu", callback: null }]; const priority = this.PRIORITY_WARNING_MEDIUM; this.appendNotification(message, "popup-blocked", null, priority, buttons); } } ]]> install.addon.pendingOperations & tmp.AddonManager.PENDING_INSTALL)) { messageString = this._stringBundle.GetStringFromName("addonsInstalledNeedsRestart"); if (mainAction) secondaryActions = [mainAction]; mainAction = { label: this._stringBundle.GetStringFromName("addonInstallRestartButton"), accessKey: this._stringBundle.GetStringFromName("addonInstallRestartButton.accesskey"), callback: function () { BrowserUtils.restartApplication(); } }; } else { messageString = this._stringBundle.GetStringFromName("addonsInstalled"); } var brandShortName = this._brandStringBundle.GetStringFromName("brandShortName"); messageString = tmp.PluralForm.get(installInfo.installs.length, messageString) .replace("#1", installInfo.installs[0].name) .replace("#2", installInfo.installs.length) .replace("#3", brandShortName); // Make notifications persist a minimum of 30 seconds var options = { timeout: Date.now() + 30000 }; PopupNotifications.show(this.activeBrowser, "addon-install-complete", messageString, "addons-notification-icon", mainAction, secondaryActions, options); ]]> = 0) max += aInstall.maxProgress; progress += aInstall.progress; if (aInstall.state < tmp.AddonManager.STATE_DOWNLOADED) count++; }); if (max < 0) this.setAttribute("mode", "undetermined"); else { this.setAttribute("mode", "determined"); this.setAttribute("progress", progress * 100 / max); } var now = Date.now(); if (!this.startTime) { this.startTime = now; this.lastUpdate = now - 750; this.lastSeconds = null; } if (progress == max || now - this.lastUpdate >= 750) { this.lastUpdate = now; var elapsed = (now - this.startTime) / 1000; var rate = elapsed && progress / elapsed; ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm", tmp); var status; [status, this.lastSeconds] = tmp.DownloadUtils.getDownloadStatus(progress, max, rate, this.lastSeconds); this.setAttribute("status", status); } if (!count) this.close(); ]]> = 0) max += aInstall.maxProgress; progress += aInstall.progress; if (aInstall.state < tmp.AddonManager.STATE_DOWNLOADED) count++; }); if (max < 0) this.setAttribute("mode", "undetermined"); else { this.setAttribute("mode", "determined"); this.setAttribute("progress", progress * 100 / max); } var now = Date.now(); if (!this.startTime) { this.startTime = now; this.lastUpdate = now - 750; this.lastSeconds = null; } if (progress == max || now - this.lastUpdate >= 750) { this.lastUpdate = now; var elapsed = (now - this.startTime) / 1000; var rate = elapsed && progress / elapsed; ChromeUtils.import("resource://gre/modules/DownloadUtils.jsm", tmp); var status; [status, this.lastSeconds] = tmp.DownloadUtils.getDownloadStatus(progress, max, rate, this.lastSeconds); this.setAttribute("status", status); } if (!count) PopupNotifications.remove(this.notification); ]]>