From 61c36b052344c22ebc919e87af46440e395c4746 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 10 Nov 2012 19:38:22 -0500 Subject: [PATCH] Add ZoteroPaneOpen command line argument to open Zotero automatically --- chrome/content/zotero/zoteroPane.js | 7 +++++++ components/zotero-service.js | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index b7a6888fa..c8fa78897 100644 --- 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 index 4a892a013..589d14cf3 100644 --- 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",