commit 61c36b052344c22ebc919e87af46440e395c4746
parent 73f775950d958d15cf89cc4f9c4227ca06872f13
Author: Dan Stillman <dstillman@zotero.org>
Date: Sat, 10 Nov 2012 19:38:22 -0500
Add ZoteroPaneOpen command line argument to open Zotero automatically
Diffstat:
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js
@@ -240,6 +240,13 @@ var ZoteroPane = new function()
sep.nextSibling.nextSibling.hidden = false;
sep.nextSibling.nextSibling.nextSibling.hidden = false;
}
+
+ if (Zotero.openPane) {
+ Zotero.openPane = false;
+ setTimeout(function () {
+ ZoteroPane_Local.show();
+ }, 0);
+ }
}
diff --git a/components/zotero-service.js b/components/zotero-service.js
@@ -409,6 +409,13 @@ ZoteroCommandLineHandler.prototype = {
}
}
}
+ // handler to open Zotero pane at startup in Zotero for Firefox
+ else {
+ var zPaneOpen = cmdLine.handleFlag("ZoteroPaneOpen", false);
+ if (zPaneOpen) {
+ this.Zotero.openPane = true;
+ }
+ }
},
contractID: "@mozilla.org/commandlinehandler/general-startup;1?type=zotero",