[Pkg-mozext-commits] [wot] 06/226: Use localized OSD files.
David Prévot
taffit at moszumanska.debian.org
Fri May 1 00:35:28 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository wot.
commit 6ea70d1c98d72051615c955a3c5b2d1356851d29
Author: Sami Tolvanen <sami at mywot.com>
Date: Thu Jan 26 23:35:25 2012 +0200
Use localized OSD files.
---
content/config.js | 5 ++---
content/util.js | 9 +++++++--
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/content/config.js b/content/config.js
index 88a5a33..512ad17 100644
--- a/content/config.js
+++ b/content/config.js
@@ -19,7 +19,7 @@
*/
const WOT_PLATFORM = "firefox";
-const WOT_VERSION = "20120113";
+const WOT_VERSION = "20120126";
/*
* Constants
@@ -55,8 +55,7 @@ const WOT_MIN_COMMENT_DIFF = 35;
const WOT_APPLICATIONS = 6;
/* Search */
-const WOT_SAFESEARCH_NAME = "WOT Safe Search";
-const WOT_SAFESEARCH_URL = "http://www.mywot.com/files/downloads/wotsafesearch.xml";
+const WOT_SAFESEARCH_OSD_URL = "https://search.mywot.com/osd/en-US.xml";
/* API */
const WOT_SERVICE_NORMAL = "http://api.mywot.com";
diff --git a/content/util.js b/content/util.js
index 13c220f..6465848 100644
--- a/content/util.js
+++ b/content/util.js
@@ -441,9 +441,14 @@ var wot_browser =
var bss = Components.classes["@mozilla.org/browser/search-service;1"]
.getService(Components.interfaces.nsIBrowserSearchService);
- if (!bss.getEngineByName(WOT_SAFESEARCH_NAME)) {
- bss.addEngine(WOT_SAFESEARCH_URL, 1, null, false);
+ var url = WOT_SAFESEARCH_OSD_URL;
+ var lang = wot_util.getstring("language");
+
+ if (lang) {
+ url = url.replace("/en-US", "/" + lang);
}
+
+ bss.addEngine(url, 1, null, false);
} catch (e) {
dump("wot_browser.installsearch: failed with " + e + "\n");
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/wot.git
More information about the Pkg-mozext-commits
mailing list