From af5a8f57319686284e17ef5e3bb0dcfb6b6c97a1 Mon Sep 17 00:00:00 2001 From: LouCypher Date: Mon, 7 Oct 2013 10:31:13 +0700 Subject: [PATCH] AMO warning --- extension/bootstrap.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/extension/bootstrap.js b/extension/bootstrap.js index 5779b82..4074a5c 100644 --- a/extension/bootstrap.js +++ b/extension/bootstrap.js @@ -206,7 +206,15 @@ function startup(data, reason) { ], returnType: "string", exec: function(args, context) { - let prefname = "general.useragent.locale"; + let prefname = "general.useragent.locale"; // See AMO warning below + /* + AMO warning from add-on validator: + --- + Potentially unsafe preference branch referenced + Warning: Extensions should not alter preferences in this preference branch + --- + I couldn't find another way to change browser locale without using preferences + */ let prefs = Services.prefs; let msgPrefix = "Browser language: '"; let msgSuffix = "'";