www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 828a2917c41189268d9c88617b825fa5371bb7c6
parent 55f044f87a79b73a99873f4fd761cd9ff50836d0
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon, 22 Jul 2013 20:23:48 -0400

Add Zotero.platformVersion and Zotero.platformMajorVersion

platformVersion is a string that needs to be checked with
nsIVersionComparator. platformMajorVersion is an integer that can be
checked with > and < when the major Gecko version is enough.

Diffstat:
Mchrome/content/zotero/xpcom/zotero.js | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -223,9 +223,10 @@ Components.utils.import("resource://gre/modules/Services.jsm"); this.mainThread = Components.classes["@mozilla.org/thread-manager;1"].getService().mainThread; - var appInfo = Components.classes["@mozilla.org/xre/app-info;1"]. - getService(Components.interfaces.nsIXULAppInfo), - platformVersion = appInfo.platformVersion; + var appInfo = Components.classes["@mozilla.org/xre/app-info;1"] + .getService(Components.interfaces.nsIXULAppInfo); + this.platformVersion = appInfo.platformVersion; + this.platformMajorVersion = parseInt(appInfo.platformVersion.match(/^[0-9]+/)[0]); this.isFx = true; this.isFx3 = false; this.isFx35 = false;