[Pkg-mozext-commits] [wot] 222/226: Imported Upstream version 20150421
David Prévot
taffit at moszumanska.debian.org
Fri May 1 00:35:54 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 ca5008ac51a41964e2fe5a7ee4ccc0281d160857
Merge: 826d485 6643ce5
Author: David Prévot <david at tilapin.org>
Date: Thu Apr 30 19:53:43 2015 -0400
Imported Upstream version 20150421
META-INF/manifest.mf | 14 +-
META-INF/zigbert.rsa | Bin 2772 -> 2772 bytes
META-INF/zigbert.sf | 18 +-
chrome.manifest | 1 +
chrome/wot.jar!/content/api.js | 599 ++++++----
chrome/wot.jar!/content/blocked.html | 12 +
chrome/wot.jar!/content/cache.js | 59 +-
chrome/wot.jar!/content/categories.js | 103 +-
chrome/wot.jar!/content/commands.js | 6 +-
chrome/wot.jar!/content/config.js | 37 +-
chrome/wot.jar!/content/cookies.js | 2 +
chrome/wot.jar!/content/core.js | 187 +--
chrome/wot.jar!/content/firstrun.js | 2 +
chrome/wot.jar!/content/injections/ga_init.js | 1 +
chrome/wot.jar!/content/injections/wot_proxy.js | 4 +-
chrome/wot.jar!/content/my.js | 22 +-
chrome/wot.jar!/content/overlay.xul | 10 +-
chrome/wot.jar!/content/partner.js | 2 +
chrome/wot.jar!/content/popup.js | 10 +-
chrome/wot.jar!/content/prefs.js | 12 +-
chrome/wot.jar!/content/ratingwindow.js | 89 +-
chrome/wot.jar!/content/rw/proxies.js | 59 +-
chrome/wot.jar!/content/rw/ratingwindow.html | 366 +++---
chrome/wot.jar!/content/rw/ratingwindow.js | 1337 +++++++++++++++++++---
chrome/wot.jar!/content/rw/wot.js | 132 ++-
chrome/wot.jar!/content/search.js | 112 +-
chrome/wot.jar!/content/settings.js | 30 +-
chrome/wot.jar!/content/shared.js | 31 +-
chrome/wot.jar!/content/stats.js | 318 +++++
chrome/wot.jar!/content/storage.js | 180 +++
chrome/wot.jar!/content/surveys.js | 4 +-
chrome/wot.jar!/content/{partner.js => tools.js} | 42 +-
chrome/wot.jar!/content/ui.js | 20 +-
chrome/wot.jar!/content/util.js | 25 +-
chrome/wot.jar!/content/warning.js | 479 +++++---
chrome/wot.jar!/content/wg.js | 179 +++
chrome/wot.jar!/locale/cs-CZ/blocked.html | 17 -
chrome/wot.jar!/locale/cs-CZ/wot.properties | 20 +
chrome/wot.jar!/locale/de-DE/blocked.html | 17 -
chrome/wot.jar!/locale/de-DE/wot.properties | 20 +
chrome/wot.jar!/locale/en-US/blocked.html | 17 -
chrome/wot.jar!/locale/en-US/wot.properties | 17 +-
chrome/wot.jar!/locale/es-ES/blocked.html | 17 -
chrome/wot.jar!/locale/es-ES/wot.properties | 20 +
chrome/wot.jar!/locale/fi-FI/blocked.html | 17 -
chrome/wot.jar!/locale/fi-FI/wot.properties | 20 +
chrome/wot.jar!/locale/fr-FR/blocked.html | 17 -
chrome/wot.jar!/locale/fr-FR/wot.properties | 20 +
chrome/wot.jar!/locale/hi-IN/loading.html | 24 +
chrome/wot.jar!/locale/hi-IN/wot.dtd | 18 +
chrome/wot.jar!/locale/hi-IN/wot.properties | 156 +++
chrome/wot.jar!/locale/it-IT/blocked.html | 17 -
chrome/wot.jar!/locale/it-IT/wot.properties | 20 +
chrome/wot.jar!/locale/ja-JP/blocked.html | 17 -
chrome/wot.jar!/locale/ja-JP/wot.properties | 20 +
chrome/wot.jar!/locale/ko-KR/blocked.html | 17 -
chrome/wot.jar!/locale/ko-KR/wot.properties | 20 +
chrome/wot.jar!/locale/pl-PL/blocked.html | 17 -
chrome/wot.jar!/locale/pl-PL/wot.properties | 20 +
chrome/wot.jar!/locale/pt-BR/blocked.html | 17 -
chrome/wot.jar!/locale/pt-BR/wot.properties | 20 +
chrome/wot.jar!/locale/ru-RU/blocked.html | 17 -
chrome/wot.jar!/locale/ru-RU/wot.properties | 15 +-
chrome/wot.jar!/locale/sv-SE/blocked.html | 17 -
chrome/wot.jar!/locale/sv-SE/wot.properties | 20 +
chrome/wot.jar!/locale/tr-TR/blocked.html | 17 -
chrome/wot.jar!/locale/tr-TR/wot.properties | 20 +
chrome/wot.jar!/locale/uk-UA/blocked.html | 17 -
chrome/wot.jar!/locale/uk-UA/wot.properties | 20 +
chrome/wot.jar!/locale/zh-CN/blocked.html | 17 -
chrome/wot.jar!/locale/zh-CN/wot.properties | 20 +
chrome/wot.jar!/locale/zh-TW/blocked.html | 17 -
chrome/wot.jar!/locale/zh-TW/wot.properties | 20 +
chrome/wot.jar!/skin/b/message.png | Bin 0 -> 1392 bytes
chrome/wot.jar!/skin/include/blocked.css | 5 +
chrome/wot.jar!/skin/include/blocked.js | 240 ----
chrome/wot.jar!/skin/include/warning.css | 726 ++++++------
chrome/wot.jar!/skin/ratingwindow.css | 507 +++++++-
chrome/wot.jar!/skin/typeahead.css | 238 ++++
chrome/wot.jar!/skin/wot.css | 5 +
install.rdf | 16 +-
81 files changed, 4970 insertions(+), 2090 deletions(-)
diff --cc META-INF/manifest.mf
index d8fd005,0000000..220bfcc
mode 100644,000000..100644
--- a/META-INF/manifest.mf
+++ b/META-INF/manifest.mf
@@@ -1,23 -1,0 +1,23 @@@
+Manifest-Version: 1.0
- Created-By: Signtool (signtool 3.14.3.0 Basic ECC)
++Created-By: Signtool (signtool 3.17.4 Basic ECC)
+Comments: PLEASE DO NOT EDIT THIS FILE. YOU WILL BREAK IT.
+
+Name: chrome.manifest
+Digest-Algorithms: MD5 SHA1
- MD5-Digest: 1GaXeKxllleWTYmsnF48zw==
- SHA1-Digest: ch4/JCA8aIe9wP1UNNoF0mbHk40=
++MD5-Digest: /oU++5KN8lEWQxOkUI075g==
++SHA1-Digest: ftB9EsNMWKkp1cd3YTMeZ8cXTA4=
+
+Name: chrome/wot.jar
+Digest-Algorithms: MD5 SHA1
- MD5-Digest: OnDQ57K1kh24XcgN8YkJMQ==
- SHA1-Digest: V5UzLz1aHYN/v9z3kyjn8B2H7UY=
++MD5-Digest: /Jljh0vWVjFTZHFgru0FkA==
++SHA1-Digest: y7KKji9HNWEZPNZYpAwJ8RX0zLo=
+
+Name: install.rdf
+Digest-Algorithms: MD5 SHA1
- MD5-Digest: shZeurAsjZCntnE1W8zQ/w==
- SHA1-Digest: H/SMNOMIQ1lRsa8YY3Q3zxcRiLE=
++MD5-Digest: qmxFcMujiVMiHy56Jg0Csg==
++SHA1-Digest: ir86ZIgkzwByHLbgWthBnD6YnN0=
+
+Name: COPYING
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: 0yI5vLZzRjq4dOgNR/rlBA==
+SHA1-Digest: hiS82uVbru8AzRHV38+mD2hxCgI=
diff --cc META-INF/zigbert.rsa
index 316c57a,0000000..4f4ae0a
mode 100644,000000..100644
Binary files differ
diff --cc META-INF/zigbert.sf
index d0196be,0000000..068ca34
mode 100644,000000..100644
--- a/META-INF/zigbert.sf
+++ b/META-INF/zigbert.sf
@@@ -1,26 -1,0 +1,26 @@@
+Signature-Version: 1.0
- Created-By: Signtool (signtool 3.14.3.0 Basic ECC)
++Created-By: Signtool (signtool 3.17.4 Basic ECC)
+Comments: PLEASE DO NOT EDIT THIS FILE. YOU WILL BREAK IT.
+Digest-Algorithms: MD5 SHA1
- MD5-Digest: BDMGUqpQBice5iun/imZMw==
- SHA1-Digest: /8+zfE8pFJgsKk0U/ZWIzo8qpy4=
++MD5-Digest: HK8sidJqdQNDdi1t1NHVBg==
++SHA1-Digest: Dl+xQz9noMvGDcBjziCy4VJuAkI=
+
+Name: chrome.manifest
+Digest-Algorithms: MD5 SHA1
- MD5-Digest: amRmRGv3F4A4oDyxr/da9w==
- SHA1-Digest: BnnRVkbzKBIQVW0a+wyYEddpKO4=
++MD5-Digest: jSkf0R+glDqM4uDYOpiLJQ==
++SHA1-Digest: DZnK3RRC/iyH8r8vaGq7VJJ/b6Y=
+
+Name: chrome/wot.jar
+Digest-Algorithms: MD5 SHA1
- MD5-Digest: ivZGpvusRAX8nz4RPx/QHQ==
- SHA1-Digest: EEHXDgvEJMrPFJEFuLv+v/N23Cw=
++MD5-Digest: RutsBCnNrsJ/+nf0ofuteg==
++SHA1-Digest: TSMkePm1JPENxwZwDyoUqimZNVA=
+
+Name: install.rdf
+Digest-Algorithms: MD5 SHA1
- MD5-Digest: mGbhopDvk48e01O5DIRQ5g==
- SHA1-Digest: r3ncRfGtSKn+yHRiaenxf83WcFI=
++MD5-Digest: 4gVRsW+HI2TFuNNfNFbsDA==
++SHA1-Digest: RQAHFRGJqL5p5FWeI24LrQss6kM=
+
+Name: COPYING
+Digest-Algorithms: MD5 SHA1
+MD5-Digest: M1qikWTM6WGn/V6lnXhZeQ==
+SHA1-Digest: 88y2p8RtMnYtr+ICExjSt+MeZ0s=
diff --cc chrome.manifest
index 3f4c778,2c10e1b..b66ea61
--- a/chrome.manifest
+++ b/chrome.manifest
@@@ -1,24 -1,25 +1,25 @@@
-content wot content/
-content wot content/ contentaccessible=yes
-resource wot-base-dir content/
+content wot jar:chrome/wot.jar!/content/
+content wot jar:chrome/wot.jar!/content/ contentaccessible=yes
+resource wot-base-dir jar:chrome/wot.jar!/content/
overlay chrome://browser/content/browser.xul chrome://wot/content/overlay.xul
overlay chrome://navigator/content/navigatorOverlay.xul chrome://wot/content/overlay.xul
-locale wot en-US locale/en-US/
-locale wot ru-RU locale/ru-RU/
-locale wot cs-CZ locale/cs-CZ/
-locale wot de-DE locale/de-DE/
-locale wot fi-FI locale/fi-FI/
-locale wot pl-PL locale/pl-PL/
-locale wot sv-SE locale/sv-SE/
-locale wot it-IT locale/it-IT/
-locale wot fr-FR locale/fr-FR/
-locale wot pt-BR locale/pt-BR/
-locale wot es-ES locale/es-ES/
-locale wot ja-JP locale/ja-JP/
-locale wot ko-KR locale/ko-KR/
-locale wot zh-CN locale/zh-CN/
-locale wot zh-TW locale/zh-TW/
-locale wot uk-UA locale/uk-UA/
-locale wot tr-TR locale/tr-TR/
-locale wot hi-IN locale/hi-IN/
-skin wot classic/1.0 skin/
+locale wot en-US jar:chrome/wot.jar!/locale/en-US/
+locale wot ru-RU jar:chrome/wot.jar!/locale/ru-RU/
+locale wot cs-CZ jar:chrome/wot.jar!/locale/cs-CZ/
+locale wot de-DE jar:chrome/wot.jar!/locale/de-DE/
+locale wot fi-FI jar:chrome/wot.jar!/locale/fi-FI/
+locale wot pl-PL jar:chrome/wot.jar!/locale/pl-PL/
+locale wot sv-SE jar:chrome/wot.jar!/locale/sv-SE/
+locale wot it-IT jar:chrome/wot.jar!/locale/it-IT/
+locale wot fr-FR jar:chrome/wot.jar!/locale/fr-FR/
+locale wot pt-BR jar:chrome/wot.jar!/locale/pt-BR/
+locale wot es-ES jar:chrome/wot.jar!/locale/es-ES/
+locale wot ja-JP jar:chrome/wot.jar!/locale/ja-JP/
+locale wot ko-KR jar:chrome/wot.jar!/locale/ko-KR/
+locale wot zh-CN jar:chrome/wot.jar!/locale/zh-CN/
+locale wot zh-TW jar:chrome/wot.jar!/locale/zh-TW/
+locale wot uk-UA jar:chrome/wot.jar!/locale/uk-UA/
+locale wot tr-TR jar:chrome/wot.jar!/locale/tr-TR/
++locale wot hi-IN jar:chrome/wot.jar!/locale/hi-IN/
+skin wot classic/1.0 jar:chrome/wot.jar!/skin/
style chrome://global/content/customizeToolbar.xul chrome://wot/skin/toolbar.css
diff --cc chrome/wot.jar!/content/blocked.html
index 0000000,32521f2..32521f2
mode 000000,100644..100644
--- a/chrome/wot.jar!/content/blocked.html
+++ b/chrome/wot.jar!/content/blocked.html
diff --cc chrome/wot.jar!/content/config.js
index f15676f,1abb81e..0724c2b
--- a/chrome/wot.jar!/content/config.js
+++ b/chrome/wot.jar!/content/config.js
@@@ -1,6 -1,6 +1,6 @@@
/*
config.js
-- Copyright © 2005 - 2013 WOT Services Oy <info at mywot.com>
++ Copyright © 2005 - 2015 WOT Services Oy <info at mywot.com>
This file is part of WOT.
@@@ -18,8 -18,10 +18,10 @@@
along with WOT. If not, see <http://www.gnu.org/licenses/>.
*/
+ "use strict";
+
const WOT_PLATFORM = "firefox";
- const WOT_VERSION = "20131118";
-const WOT_VERSION = "20140422";
++const WOT_VERSION = "20150421";
/*
* Constants
@@@ -299,7 -294,7 +294,11 @@@ const wot_prefs_char =
[ "feedback_lasttimeasked", "" ],
[ "wt_rw_shown_dt", "" ], // timestamp when RW WelcomeTip was shown last time
[ "settingsui_warnlevel", "normal" ], // this is should not be considered by the add-on. Only to render prefs on the settings page
-- [ "settingsui_searchlevel", "normal" ]
++ [ "settingsui_searchlevel", "normal" ],
++ [ "stats_uid", "" ],
++ [ "stats_sess", "" ],
++ [ "stats_installtime", "" ],
++ [ "stats_settings", "" ]
];
const wot_prefs_int = [
@@@ -401,10 -396,3 +400,10 @@@ const WOT_SITEAPI_ERRORS =
COMMENT_SAVE_FAILED: 18
}
};
+
- var wot_modules = [];
-
- // This function should be moved to other place
- function wdump (str) {
- dump(str + "\n");
- }
++const WOT_STATS = {
++ SID: "241",
++ VER: "1.0",
++ URL: "https://secure.mywot.com/config",
++ ST: 60 * 1000 * 30
++};
diff --cc chrome/wot.jar!/content/core.js
index 08e98c4,11958aa..0355223
mode 100644,100644..100755
--- a/chrome/wot.jar!/content/core.js
+++ b/chrome/wot.jar!/content/core.js
@@@ -34,6 -36,6 +36,10 @@@ wot_listener.prototype
Components.interfaces.nsIWebProgressListener.STATE_TRANSFERRING |
Components.interfaces.nsIWebProgressListener.STATE_NEGOTIATING,
++ finish_loading: Components.interfaces.nsIWebProgressListener.STATE_STOP ,
++
++ same_document : Components.interfaces.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT,
++
isdocument: Components.interfaces.nsIWebProgressListener.STATE_IS_DOCUMENT,
abort: function(request)
@@@ -52,16 -54,16 +58,28 @@@
return this;
},
-- onLocationChange: function(progress, request, location)
++ onLocationChange: function(browser, progress, request, location)
{
-- if (progress.DOMWindow != this.browser.contentWindow) {
-- return;
-- }
++ try {
++ if (progress.DOMWindow != browser.contentWindow) {
++ return;
++ }
-- if (location) {
-- wot_core.block(this, request, location.spec);
-- }
-- wot_core.update();
++ var tabUrl = location.spec;
++ if (location) {
++ wot_core.block(this, request, tabUrl);
++ }
++ wot_core.update();
++
++ if (tabUrl && wot_stats.isWebURL(tabUrl)) {
++ var ref = browser.contentDocument.referrer;
++ if (request && request.referrer && typeof(request.referrer) != undefined) {
++ ref = request.referrer.asciiSpec;
++ }
++
++ wot_stats.loc(tabUrl, ref);
++ }
++ } catch(e) { }
},
onProgressChange: function(progress, request, curSelfProgress,
@@@ -69,23 -71,23 +87,32 @@@
{
},
-- onStateChange: function(progress, request, flags, status)
++ onStateChange: function(browser, progress, request, flags, status)
{
-- if (progress.DOMWindow != this.browser.contentWindow) {
-- return;
-- }
++ try {
++ if (progress.DOMWindow != browser.contentWindow) {
++ return;
++ }
-- if (flags & this.loading && flags & this.isdocument &&
-- request) {
-- wot_core.block(this, request, request.name);
-- }
++ if (flags & this.loading && flags & this.isdocument && request) {
++ wot_core.block(this, request, request.name);
++ }
++ } catch(e) { }
+ },
+
- onStatusChange: function(progress, request, status, message)
++ onStatusChange: function(browser, webProgress, request, status, message)
+ {
+ },
+
- onSecurityChange: function(progress, request, state)
++ onSecurityChange: function(browser, progress, request, state)
++ {
+ },
+
- onStatusChange: function(progress, request, status, message)
++ onRefreshAttempted: function(browser, webProgress, refrushURI, millis, sameUri)
+ {
+ },
+
- onSecurityChange: function(progress, request, state)
++ onLinkIconAvailable: function(browser)
{
}
};
@@@ -139,6 -153,6 +178,7 @@@ var wot_core
}
} catch (e) {
dump("wot_core.init: failed with " + e + "\n");
++// console.log("wot_core.init() - error." +e);
}
},
@@@ -151,38 -165,42 +191,40 @@@
}
}
- window.setTimeout(function() {
- for (var i in wot_modules) {
- if (typeof(wot_modules[i].obj.load_delayed) == "function") {
- wot_modules[i].obj.load_delayed();
+ wot_storage.init(function() { // continue initialization only after the storage is loaded
+ // schedule delayed load of modules ()
+ window.setTimeout(function() {
+ for (var i in wot_modules) {
+ if (typeof(wot_modules[i].obj.load_delayed) == "function") {
+ wot_modules[i].obj.load_delayed();
+ }
}
- }
- wot_prefs.setupdateui();
- wot_api_register.send();
- wot_my_session.update(true);
+ wot_prefs.setupdateui();
+ wot_api_register.send();
+ wot_my_session.update(true);
- wot_core.loaded = true;
- wot_core.update();
- }, 250);
+ wot_core.loaded = true;
+ wot_core.update();
+ }, 250);
- try {
- Components.utils.import("resource://gre/modules/AddonManager.jsm");
- AddonManager.addAddonListener(wot_core.install_listener);
- } catch (e) {
- dump("wot_core.load() setting up uninstall listener failed with " + e + "\n");
- }
+ try {
+ Components.utils.import("resource://gre/modules/AddonManager.jsm");
+ AddonManager.addAddonListener(wot_core.install_listener);
+ } catch (e) {
+ dump("wot_core.load() setting up uninstall listener failed with " + e + "\n");
+ }
- var browser = getBrowser();
- this.listener = new wot_listener(browser);
- browser.addProgressListener(this.listener);
+ var browser = getBrowser();
+ wot_core.listener = new wot_listener(browser);
- browser.addProgressListener(wot_core.listener);
++ browser.addTabsProgressListener(wot_core.listener);
+
+ if (browser.tabContainer) {
- browser.tabContainer.addEventListener("TabOpen",
- wot_core.tabopen, false);
+ browser.tabContainer.addEventListener("TabSelect",
+ wot_core.tabselect, false);
+ }
+ });
- if (browser.tabContainer) {
- browser.tabContainer.addEventListener("TabOpen",
- wot_core.tabopen, false);
- browser.tabContainer.addEventListener("TabSelect",
- wot_core.tabselect, false);
- }
} catch (e) {
dump("wot_core.load: failed with " + e + "\n");
}
@@@ -207,13 -225,13 +249,11 @@@
var browser = getBrowser();
if (this.listener) {
-- browser.removeProgressListener(this.listener);
++ browser.removeTabsProgressListener(this.listener);
this.listener = null;
}
if (browser.tabContainer) {
-- browser.tabContainer.removeEventListener("TabOpen",
-- wot_core.tabopen, false);
browser.tabContainer.removeEventListener("TabSelect",
wot_core.tabselect, false);
}
@@@ -290,33 -308,33 +330,13 @@@
{
try {
var browser = getBrowser().selectedTab;
--
-- if (browser && browser.listener) {
-- browser.removeProgressListener(browser.listener);
-- browser.listener = null;
-- }
++ var tabUrl = event.target.linkedBrowser.currentURI.spec;
++ wot_stats.focus(tabUrl);
} catch (e) {
dump("wot_core.tabselect: failed with " + e + "\n");
}
},
-- tabopen: function(event)
-- {
-- try {
-- var browser = event.target.linkedBrowser;
--
-- if (!browser || browser.listener) {
-- return;
-- }
--
-- /* Catch state changes for background tabs */
-- browser.listener = new wot_listener(browser);
-- browser.addProgressListener(browser.listener);
-- } catch (e) {
-- dump("wot_core.tabopen: failed with " + e + "\n");
-- }
-- },
--
showloading: function(pl, request, url, hostname)
{
try {
diff --cc chrome/wot.jar!/content/overlay.xul
index ff93f5d,0ea8d79..4a168ef
mode 100644,100644..100755
--- a/chrome/wot.jar!/content/overlay.xul
+++ b/chrome/wot.jar!/content/overlay.xul
@@@ -45,6 -47,7 +47,8 @@@
<script type="application/x-javascript" src="chrome://wot/content/api.js"/>
<script type="application/x-javascript" src="chrome://wot/content/firstrun.js"/>
<script type="application/x-javascript" src="chrome://wot/content/partner.js"/>
+ <script type="application/x-javascript" src="chrome://wot/content/wg.js"/>
++ <script type="application/x-javascript" src="chrome://wot/content/stats.js"/>
<script type="application/x-javascript" src="chrome://wot/content/core.js"/>
<stringbundleset id="stringbundleset">
diff --cc chrome/wot.jar!/content/stats.js
index 0000000,0000000..bb9751a
new file mode 100755
--- /dev/null
+++ b/chrome/wot.jar!/content/stats.js
@@@ -1,0 -1,0 +1,318 @@@
++var wot_stats =
++{
++ utils: {
++ serialize: function(obj)
++ {
++ var str = [];
++ var length = 0;
++ for(var p in obj) {
++ if (obj.hasOwnProperty(p)) {
++ length++;
++ str.push(p + "=" + obj[p]);
++ }
++ }
++ return {
++ data: str.join("&"),
++ length:length
++ };
++ },
++
++ postRequest: function(url, data, length, callback)
++ {
++ try {
++ var http = new XMLHttpRequest();
++ http.open("POST", url, true);
++ http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
++
++ http.onreadystatechange = function() {
++ if (http.readyState == 4) {
++ if (http.status == 200) {
++ if (callback) {
++ callback(true, http.responseText);
++ }
++ }
++ else {
++ if (callback) {
++ callback(false, http.responseText);
++ }
++ }
++ }
++ };
++ http.send(data);
++ }
++ catch(e) {
++ console.log("postRequest() - error." + e);
++ }
++ },
++
++ dictionaryToQueryString: function(dict)
++ {
++ var result = '';
++ for(key in dict) {
++ result += key + '=' + dict[key] + '&';
++ }
++ return result.slice(0, result.length - 1);
++ },
++
++ createRandomString: function (string_size)
++ {
++ var text = "";
++ var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
++
++ for (var i = 0; i < string_size; i++)
++ text += possible.charAt(Math.floor(Math.random() * possible.length));
++
++ return text;
++ },
++
++ RESPONSE_RECEIVED: 4,
++ getRequest: function(url, callback)
++ {
++ try {
++ var xmlhttp = new XMLHttpRequest();
++
++ xmlhttp.onreadystatechange = function() {
++ if (xmlhttp.readyState == wot_stats.utils.RESPONSE_RECEIVED) {
++ if (xmlhttp.status == 200) {
++ callback(true,xmlhttp.responseText);
++ }
++ else {
++ callback(false, xmlhttp.responseText);
++ }
++ }
++ }
++ xmlhttp.open("GET", url, true);
++ xmlhttp.send();
++ }
++ catch(e){
++ console.log("getRequest() - error. " +e);
++ }
++ },
++
++ getCurrentTime: function()
++ {
++ return new Date().getTime();
++ }
++ },
++
++ last_prev: "",
++ enabled: false,
++ statusKey: "ok",
++ urlKey: "url",
++
++ load: function()
++ {
++ try {
++ var settings = this.getMonitoringSettings();
++ if (settings != null && settings[this.statusKey] == 1) {
++ this.startMonitoring();
++ }
++ this.fetchSettings();
++ }
++ catch(e) {
++ console.log("load() - error." + e);
++ }
++ },
++
++ isWebURL: function(url)
++ {
++ return url.toLowerCase().indexOf("http") == 0;
++ },
++
++ getInstallTime: function()
++ {
++ var stats_installtime = wot_prefs.getChar("stats_installtime", "");
++ if (stats_installtime === "") {
++ wot_prefs.setChar("stats_installtime", this.utils.getCurrentTime());
++ }
++ return wot_prefs.getChar("stats_installtime", null);
++ },
++
++ setMonitoringSettings: function(settings)
++ {
++ if (settings) {
++ wot_prefs.setChar("stats_settings", settings);
++ }
++ },
++
++ getMonitoringSettings: function()
++ {
++ var stats_settings = wot_prefs.getChar("stats_settings", "");
++ if (stats_settings !== "") {
++ try {
++ var settingsJson = JSON.parse(stats_settings);
++ if (typeof settingsJson[this.statusKey] == "undefined" || settingsJson[this.statusKey] == null) {
++ return null;
++ }
++ if (typeof settingsJson[this.urlKey] == "undefined" || settingsJson[this.urlKey] == null) {
++ return null;
++ }
++ return settingsJson;
++ }
++ catch(e) {
++ console.log("getMonitoringSettings() - error." + e);
++ }
++ return null;
++ }
++ return null;
++ },
++
++ startMonitoring: function()
++ {
++ this.enabled = true;
++ },
++
++ fetchSettings: function()
++ {
++ var url = WOT_STATS.URL;
++ var data = {
++ "s":WOT_STATS.SID,
++ "ins":wot_stats.getInstallTime(),
++ "ver":WOT_STATS.VER
++ };
++ var queryString = this.utils.dictionaryToQueryString(data);
++ url = url + "?" + queryString;
++ this.utils.getRequest(url, this.onSettingsReceived);
++ },
++
++ onSettingsReceived: function(status, response)
++ {
++ wot_stats.setMonitoringSettings(response);
++ var settings = wot_stats.getMonitoringSettings();
++
++ if(settings[wot_stats.statusKey] == 1) {
++ wot_stats.startMonitoring();
++ }
++ },
++
++ getUserId: function()
++ {
++ var stats_uid = wot_prefs.getChar("stats_uid", "");
++ if (stats_uid === "") {
++ wot_prefs.setChar("stats_uid", this.utils.createRandomString(32));
++ }
++ return wot_prefs.getChar("stats_uid", null);
++ },
++
++ getSession: function()
++ {
++ var session = wot_prefs.getChar("stats_sess", "");
++ if (session === "") {
++ session = this.createSession();
++ this.saveSession(session);
++ }
++ else {
++ try {
++ if (this.isSessionExpired()) {
++ session = this.createSession();
++ this.saveSession(session);
++ } else {
++ return JSON.parse(session);
++ }
++ }
++ catch(e) {
++ session = this.createSession();
++ this.saveSession(session);
++ }
++ }
++ return session;
++ },
++
++ isSessionExpired: function()
++ {
++ var oldSession = wot_prefs.getChar("stats_sess", "");
++ var currentTime = this.utils.getCurrentTime();
++
++ if (oldSession !== "") {
++ var jsonOldSession = JSON.parse(oldSession);
++ var oldSessionTs = jsonOldSession['ts'];
++
++ if (typeof oldSessionTs != "undefined" && oldSessionTs && (currentTime - oldSessionTs) < WOT_STATS.ST) {
++ return false;
++ }
++ }
++ return true;
++ },
++
++ touchSession: function(prev)
++ {
++ var session = this.getSession();
++ session['ts'] = this.utils.getCurrentTime();
++ if (prev) {
++ session['prev'] = encodeURIComponent(prev);
++ }
++ this.saveSession(session);
++ },
++
++ saveSession: function(session)
++ {
++ wot_prefs.setChar("stats_sess", JSON.stringify(session));
++ },
++
++ createSession: function()
++ {
++ var session = {
++ "id" : wot_stats.utils.createRandomString(32),
++ "ts" : wot_stats.utils.getCurrentTime(),
++ "prev" : encodeURIComponent("")
++ };
++
++ session = JSON.stringify(session);
++ session = JSON.parse(session);
++ return session;
++ },
++
++ loc: function(url, ref)
++ {
++ if(this.isWebURL(url)) {
++ this.query(url, ref);
++ }
++ },
++
++ focus: function(url)
++ {
++ if(typeof url == "string" && this.isWebURL(url)) {
++ this.last_prev = url;
++ }
++ this.touchSession();
++ },
++
++ query: function(url, ref)
++ {
++ if(!this.enabled) {
++ return;
++ }
++ var settings = this.getMonitoringSettings();
++ if (this.last_prev === "") {
++ this.last_prev = decodeURIComponent(this.getSession()['prev']);
++ }
++ data = {
++ "s":WOT_STATS.SID,
++ "md":21,
++ "pid":wot_stats.getUserId(),
++ "sess":wot_stats.getSession()['id'],
++ "q":encodeURIComponent(url),
++ "prev":encodeURIComponent(wot_stats.last_prev),
++ "link":0,
++ "sub": "ff",
++ "tmv": WOT_STATS.VER,
++ "hreferer" : encodeURIComponent(ref),
++ "ts" : wot_stats.utils.getCurrentTime()
++ };
++
++ var requestDataInfo = this.utils.serialize(data);
++ var requestData = requestDataInfo.data;
++ var requestLength = requestDataInfo.length;
++
++ var encoded = btoa(btoa(requestData));
++ if (encoded != "") {
++ var data = "e=" + encodeURIComponent(encoded);
++ var statsUrl = settings[this.urlKey] + "/valid";
++ this.utils.postRequest(statsUrl, data, requestLength);
++ }
++ this.last_prev = url;
++ this.touchSession(this.last_prev);
++ }
++};
++
++wot_modules.push({ name: "wot_stats", obj: wot_stats });
diff --cc chrome/wot.jar!/content/storage.js
index 0000000,039b0a9..039b0a9
mode 000000,100644..100644
--- a/chrome/wot.jar!/content/storage.js
+++ b/chrome/wot.jar!/content/storage.js
diff --cc chrome/wot.jar!/content/wg.js
index 0000000,2cdb25d..2cdb25d
mode 000000,100644..100644
--- a/chrome/wot.jar!/content/wg.js
+++ b/chrome/wot.jar!/content/wg.js
diff --cc chrome/wot.jar!/locale/hi-IN/loading.html
index 0000000,e0657c5..e0657c5
mode 000000,100644..100644
--- a/chrome/wot.jar!/locale/hi-IN/loading.html
+++ b/chrome/wot.jar!/locale/hi-IN/loading.html
diff --cc chrome/wot.jar!/locale/hi-IN/wot.dtd
index 0000000,d0e77d4..d0e77d4
mode 000000,100644..100644
--- a/chrome/wot.jar!/locale/hi-IN/wot.dtd
+++ b/chrome/wot.jar!/locale/hi-IN/wot.dtd
diff --cc chrome/wot.jar!/locale/hi-IN/wot.properties
index 0000000,ce168ed..ce168ed
mode 000000,100644..100644
--- a/chrome/wot.jar!/locale/hi-IN/wot.properties
+++ b/chrome/wot.jar!/locale/hi-IN/wot.properties
diff --cc chrome/wot.jar!/skin/b/message.png
index 0000000,8092b51..8092b51
mode 000000,100755..100755
Binary files differ
diff --cc chrome/wot.jar!/skin/include/blocked.css
index 0000000,cdd856b..cdd856b
mode 000000,100644..100644
--- a/chrome/wot.jar!/skin/include/blocked.css
+++ b/chrome/wot.jar!/skin/include/blocked.css
diff --cc chrome/wot.jar!/skin/typeahead.css
index 0000000,967c464..967c464
mode 000000,100644..100644
--- a/chrome/wot.jar!/skin/typeahead.css
+++ b/chrome/wot.jar!/skin/typeahead.css
diff --cc install.rdf
index 52fe2a5,de05348..2918678
--- a/install.rdf
+++ b/install.rdf
@@@ -4,7 -4,7 +4,7 @@@
<em:id>{a0d7ccb3-214d-498b-b4aa-0e8fda9a7bf7}</em:id>
<em:unpack>true</em:unpack>
<em:name>WOT</em:name>
- <em:version>20131118</em:version>
- <em:version>%WOT_VERSION%</em:version>
++ <em:version>20150421</em:version>
<em:description>Web of trust.</em:description>
<em:creator>WOT Services Oy</em:creator>
<em:homepageURL>http://www.mywot.com/</em:homepageURL>
--
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