From 8371749bd118bd2fde124a6a8bd7a1fae579f50d Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 23 Feb 2015 03:31:52 -0500 Subject: [PATCH] Add Zotero.clientName, set to "Zotero" by default We should eventually replace all hard-coded uses of "Zotero" with this for use by unofficial versions (which legally can't be called "Zotero"). --- chrome/content/zotero/xpcom/zotero.js | 2 ++ resource/config.js | 1 + 2 files changed, 3 insertions(+) diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index c1c6a080c..4b8f1a384 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -213,6 +213,8 @@ Components.utils.import("resource://gre/modules/Services.jsm"); this.mainThread = Components.classes["@mozilla.org/thread-manager;1"].getService().mainThread; + this.clientName = ZOTERO_CONFIG.CLIENT_NAME; + var appInfo = Components.classes["@mozilla.org/xre/app-info;1"] .getService(Components.interfaces.nsIXULAppInfo); this.platformVersion = appInfo.platformVersion; diff --git a/resource/config.js b/resource/config.js index 05b5fff0c..673a1b9de 100644 --- a/resource/config.js +++ b/resource/config.js @@ -1,5 +1,6 @@ var ZOTERO_CONFIG = { GUID: 'zotero@chnm.gmu.edu', + CLIENT_NAME: 'Zotero', REPOSITORY_URL: 'https://repo.zotero.org/repo/', REPOSITORY_CHECK_INTERVAL: 86400, // 24 hours REPOSITORY_RETRY_INTERVAL: 3600, // 1 hour