Bug 739757 - (Part 4) Update popup blocked notifications. r=mfinkle

This commit is contained in:
Margaret Leibovic 2013-03-06 13:02:39 +00:00
parent 4160f0c856
commit 9c6c8ba4ca
2 changed files with 21 additions and 19 deletions

View File

@ -5622,30 +5622,32 @@ var PopupBlockerObserver = {
let strings = Strings.browser;
if (popupCount > 1)
message = strings.formatStringFromName("popupWarningMultiple", [brandShortName, popupCount], 2);
message = strings.formatStringFromName("popup.warningMultiple", [brandShortName, popupCount], 2);
else
message = strings.formatStringFromName("popupWarning", [brandShortName], 1);
message = strings.formatStringFromName("popup.warning", [brandShortName], 1);
let buttons = [
{
label: strings.GetStringFromName("popupButtonAllowOnce"),
callback: function() { PopupBlockerObserver.showPopupsForSite(); }
},
{
label: strings.GetStringFromName("popupButtonAlwaysAllow2"),
callback: function() {
label: strings.GetStringFromName("popup.show"),
callback: function(aChecked) {
// Set permission before opening popup windows
PopupBlockerObserver.allowPopupsForSite(true);
if (aChecked)
PopupBlockerObserver.allowPopupsForSite(true);
PopupBlockerObserver.showPopupsForSite();
}
},
{
label: strings.GetStringFromName("popupButtonNeverWarn2"),
callback: function() { PopupBlockerObserver.allowPopupsForSite(false); }
label: strings.GetStringFromName("popup.dontShow"),
callback: function(aChecked) {
if (aChecked)
PopupBlockerObserver.allowPopupsForSite(false);
}
}
];
NativeWindow.doorhanger.show(message, "popup-blocked", buttons);
let options = { checkbox: Strings.browser.GetStringFromName("popup.dontAskAgain") };
NativeWindow.doorhanger.show(message, "popup-blocked", buttons, null, options);
}
// Record the fact that we've reported this blocked popup, so we don't
// show it again.
@ -6411,8 +6413,8 @@ var PermissionsHelper = {
},
"popup": {
label: "blockPopups.label",
allowed: "popupButtonAlwaysAllow2",
denied: "popupButtonNeverWarn2"
allowed: "popup.show",
denied: "popup.dontShow"
},
"indexedDB": {
label: "offlineApps.storeOfflineData",

View File

@ -48,11 +48,11 @@ notificationRestart.blocked=Unsafe add-ons installed. Restart to disable.
notificationRestart.button=Restart
# Popup Blocker
popupWarning=%S prevented this site from opening a pop-up window.
popupWarningMultiple=%S prevented this site from opening %S pop-up windows.
popupButtonAllowOnce=Show
popupButtonAlwaysAllow2=Always Show
popupButtonNeverWarn2=Never Show
popup.warning=%S prevented this site from opening a pop-up window. Would you like to show it?
popup.warningMultiple=%S prevented this site from opening %S pop-up windows. Would you like to show them?
popup.dontAskAgain=Don't ask again for this site
popup.show=Show
popup.dontShow=Don't show
# SafeBrowsing
safeBrowsingDoorhanger=This site has been identified as containing malware or a phishing attempt. Be careful.