diff --git a/mobile/android/chrome/content/OfflineApps.js b/mobile/android/chrome/content/OfflineApps.js index 4bc7b2c3c3d0..4393efe84dde 100644 --- a/mobile/android/chrome/content/OfflineApps.js +++ b/mobile/android/chrome/content/OfflineApps.js @@ -29,17 +29,17 @@ var OfflineApps = { let strings = Strings.browser; let buttons = [{ - label: strings.GetStringFromName("offlineApps.allow"), - callback: function() { - OfflineApps.allowSite(aContentWindow.document); - } - }, - { label: strings.GetStringFromName("offlineApps.dontAllow2"), callback: function(aChecked) { if (aChecked) OfflineApps.disallowSite(aContentWindow.document); } + }, + { + label: strings.GetStringFromName("offlineApps.allow"), + callback: function() { + OfflineApps.allowSite(aContentWindow.document); + } }]; let requestor = BrowserApp.manifest ? "'" + BrowserApp.manifest.name + "'" : host; diff --git a/mobile/android/chrome/content/PluginHelper.js b/mobile/android/chrome/content/PluginHelper.js index 987f239d46b2..34955fccda76 100644 --- a/mobile/android/chrome/content/PluginHelper.js +++ b/mobile/android/chrome/content/PluginHelper.js @@ -27,16 +27,6 @@ var PluginHelper = { let message = Strings.browser.formatStringFromName("clickToPlayPlugins.message2", [uri.host], 1); let buttons = [ - { - label: Strings.browser.GetStringFromName("clickToPlayPlugins.activate"), - callback: function(aChecked) { - // If the user checked "Don't ask again", make a permanent exception - if (aChecked) - Services.perms.add(uri, "plugins", Ci.nsIPermissionManager.ALLOW_ACTION); - - PluginHelper.playAllPlugins(aTab.browser.contentWindow); - } - }, { label: Strings.browser.GetStringFromName("clickToPlayPlugins.dontActivate"), callback: function(aChecked) { @@ -46,6 +36,16 @@ var PluginHelper = { // Other than that, do nothing } + }, + { + label: Strings.browser.GetStringFromName("clickToPlayPlugins.activate"), + callback: function(aChecked) { + // If the user checked "Don't ask again", make a permanent exception + if (aChecked) + Services.perms.add(uri, "plugins", Ci.nsIPermissionManager.ALLOW_ACTION); + + PluginHelper.playAllPlugins(aTab.browser.contentWindow); + } } ]; diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index 57848182aaca..6e366436e58c 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -6648,6 +6648,13 @@ var PopupBlockerObserver = { .replace("#2", popupCount); let buttons = [ + { + label: strings.GetStringFromName("popup.dontShow"), + callback: function(aChecked) { + if (aChecked) + PopupBlockerObserver.allowPopupsForSite(false); + } + }, { label: strings.GetStringFromName("popup.show"), callback: function(aChecked) { @@ -6657,13 +6664,6 @@ var PopupBlockerObserver = { PopupBlockerObserver.showPopupsForSite(); } - }, - { - label: strings.GetStringFromName("popup.dontShow"), - callback: function(aChecked) { - if (aChecked) - PopupBlockerObserver.allowPopupsForSite(false); - } } ]; @@ -6765,13 +6765,7 @@ var IndexedDB = { observer.observe(null, responseTopic, Ci.nsIPermissionManager.UNKNOWN_ACTION); } - let buttons = [{ - label: strings.GetStringFromName("offlineApps.allow"), - callback: function() { - clearTimeout(timeoutId); - observer.observe(null, responseTopic, Ci.nsIPermissionManager.ALLOW_ACTION); - } - }, + let buttons = [ { label: strings.GetStringFromName("offlineApps.dontAllow2"), callback: function(aChecked) { @@ -6779,6 +6773,13 @@ var IndexedDB = { let action = aChecked ? Ci.nsIPermissionManager.DENY_ACTION : Ci.nsIPermissionManager.UNKNOWN_ACTION; observer.observe(null, responseTopic, action); } + }, + { + label: strings.GetStringFromName("offlineApps.allow"), + callback: function() { + clearTimeout(timeoutId); + observer.observe(null, responseTopic, Ci.nsIPermissionManager.ALLOW_ACTION); + } }]; let options = { checkbox: Strings.browser.GetStringFromName("offlineApps.dontAskAgain") }; diff --git a/mobile/android/components/ContentPermissionPrompt.js b/mobile/android/components/ContentPermissionPrompt.js index 4f67b3be86ca..78f4deb9f3ae 100644 --- a/mobile/android/components/ContentPermissionPrompt.js +++ b/mobile/android/components/ContentPermissionPrompt.js @@ -99,6 +99,16 @@ ContentPermissionPrompt.prototype = { let entityName = kEntities[perm.type]; let buttons = [{ + label: browserBundle.GetStringFromName(entityName + ".dontAllow"), + callback: function(aChecked) { + // If the user checked "Don't ask again", make a permanent exception + if (aChecked) + Services.perms.addFromPrincipal(request.principal, access, Ci.nsIPermissionManager.DENY_ACTION); + + request.cancel(); + } + }, + { label: browserBundle.GetStringFromName(entityName + ".allow"), callback: function(aChecked) { // If the user checked "Don't ask again", make a permanent exception @@ -111,16 +121,6 @@ ContentPermissionPrompt.prototype = { request.allow(); } - }, - { - label: browserBundle.GetStringFromName(entityName + ".dontAllow"), - callback: function(aChecked) { - // If the user checked "Don't ask again", make a permanent exception - if (aChecked) - Services.perms.addFromPrincipal(request.principal, access, Ci.nsIPermissionManager.DENY_ACTION); - - request.cancel(); - } }]; let requestor = chromeWin.BrowserApp.manifest ? "'" + chromeWin.BrowserApp.manifest.name + "'" : request.principal.URI.host;