Use regexp object instead of string

This commit is contained in:
Dan Stillman 2010-09-23 06:11:35 +00:00
parent 1adf489801
commit 3abda6bbd8

View file

@ -2557,7 +2557,7 @@ var ZoteroPane = new function()
* shift-click == new window, no modifier == frontmost tab
*/
function loadURI(uri, event, data) {
if (Zotero.isStandalone && uri.match("^https?")) {
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);