commit 59cff2ad1af57ff4d18eb646c6e0460dc9f9299d
parent b9eb8ecb157f1e335faed1f06d96f32305851d3c
Author: Simon Kornblith <simon@simonster.com>
Date: Tue, 16 Aug 2011 02:37:16 +0000
Fix timeline creation, and potentially other functionality
Diffstat:
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js
@@ -2637,15 +2637,19 @@ var ZoteroPane = new function()
return;
}
- if (Zotero.isStandalone && uri.match(/^https?/)) {
- var io = Components.classes['@mozilla.org/network/io-service;1']
- .getService(Components.interfaces.nsIIOService);
- var uri = io.newURI(uri, null, null);
- var handler = Components.classes['@mozilla.org/uriloader/external-protocol-service;1']
- .getService(Components.interfaces.nsIExternalProtocolService)
- .getProtocolHandlerInfo('http');
- handler.preferredAction = Components.interfaces.nsIHandlerInfo.useSystemDefault;
- handler.launchWithURI(uri, null);
+ if (Zotero.isStandalone) {
+ if(uri.match(/^https?/)) {
+ var io = Components.classes['@mozilla.org/network/io-service;1']
+ .getService(Components.interfaces.nsIIOService);
+ var uri = io.newURI(uri, null, null);
+ var handler = Components.classes['@mozilla.org/uriloader/external-protocol-service;1']
+ .getService(Components.interfaces.nsIExternalProtocolService)
+ .getProtocolHandlerInfo('http');
+ handler.preferredAction = Components.interfaces.nsIHandlerInfo.useSystemDefault;
+ handler.launchWithURI(uri, null);
+ } else {
+ ZoteroStandalone.openInViewer(uri);
+ }
return;
}