www

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

commit 03b569a2e1d8f22e835699666dac3534f742a6d9
parent 0a197f308e66ab3a111520a35cbd35040b6d3e67
Author: Simon Kornblith <simon@simonster.com>
Date:   Sun,  3 Jul 2011 06:27:04 +0000

Closes #1755, Links from Standalone preferences don't work


Diffstat:
Mchrome/content/zotero/standalone/standalone.js | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/chrome/content/zotero/standalone/standalone.js b/chrome/content/zotero/standalone/standalone.js @@ -54,6 +54,17 @@ var ZoteroStandalone = new function() } } + // Don't ask before handing http and https URIs + var eps = Components.classes['@mozilla.org/uriloader/external-protocol-service;1'] + .getService(Components.interfaces.nsIExternalProtocolService); + var hs = Components.classes["@mozilla.org/uriloader/handler-service;1"] + .getService(Components.interfaces.nsIHandlerService); + for each(var scheme in ["http", "https"]) { + var handlerInfo = eps.getProtocolHandlerInfo(scheme); + handlerInfo.preferredAction = Components.interfaces.nsIHandlerInfo.useSystemDefault; + handlerInfo.alwaysAskBeforeHandling = false; + hs.store(handlerInfo); + } } /**