mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 699513 - Advertise Telemetry opt-in on mobile [r=mfinkle]
--HG-- extra : rebase_source : c435ed26eb852ebb17bfe4474f39ca2d75c5f9c7
This commit is contained in:
parent
b3c29f4e3a
commit
f395e85f03
@ -204,6 +204,36 @@ var BrowserApp = {
|
||||
type: "Gecko:Ready"
|
||||
}
|
||||
});
|
||||
|
||||
let telemetryPrompted = false;
|
||||
try {
|
||||
telemetryPrompted = Services.prefs.getBoolPref("toolkit.telemetry.prompted");
|
||||
} catch (e) {
|
||||
// optional
|
||||
}
|
||||
|
||||
if (!telemetryPrompted) {
|
||||
let buttons = [
|
||||
{
|
||||
label: Strings.browser.GetStringFromName("telemetry.optin.yes"),
|
||||
callback: function () {
|
||||
Services.prefs.setBoolPref("toolkit.telemetry.prompted", true);
|
||||
Services.prefs.setBoolPref("toolkit.telemetry.enabled", true);
|
||||
}
|
||||
},
|
||||
{
|
||||
label: Strings.browser.GetStringFromName("telemetry.optin.no"),
|
||||
callback: function () {
|
||||
Services.prefs.setBoolPref("toolkit.telemetry.prompted", true);
|
||||
Services.prefs.setBoolPref("toolkit.telemetry.enabled", false);
|
||||
}
|
||||
}
|
||||
];
|
||||
let brandShortName = Strings.brand.GetStringFromName("brandShortName");
|
||||
let message = Strings.browser.formatStringFromName("telemetry.optin.message", [brandShortName], 1);
|
||||
NativeWindow.doorhanger.show(message, "telemetry-optin", buttons);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
shutdown: function shutdown() {
|
||||
|
@ -127,6 +127,11 @@ popupButtonAllowOnce=Show
|
||||
popupButtonAlwaysAllow2=Always Show
|
||||
popupButtonNeverWarn2=Never Show
|
||||
|
||||
# Telemetry
|
||||
telemetry.optin.message=Help improve %S by sending anonymous usage information to Mozilla?
|
||||
telemetry.optin.yes=Yes
|
||||
telemetry.optin.no=No
|
||||
|
||||
# XPInstall
|
||||
xpinstallPromptWarning2=%S prevented this site (%S) from asking you to install software on your device.
|
||||
xpinstallPromptAllowButton=Allow
|
||||
|
Loading…
Reference in New Issue
Block a user