commit 4588e0dfe60534fe95d66709f6a9440a6d1a6369
parent 411b300e27a988a6f5c4ffba3aeb08f6cfc00828
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 29 Jul 2008 17:55:44 +0000
Fix a few JS strict warnings
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/chrome/content/zotero/preferences/proxyEditor.js b/chrome/content/zotero/preferences/proxyEditor.js
@@ -20,7 +20,7 @@
***** END LICENSE BLOCK *****
*/
-Zotero_ProxyEditor = new function() {
+var Zotero_ProxyEditor = new function() {
var treechildren;
var tree;
var treecol;
diff --git a/chrome/content/zotero/xpcom/proxy.js b/chrome/content/zotero/xpcom/proxy.js
@@ -270,13 +270,13 @@ Zotero.Proxy.prototype.compileRegexp = function() {
var parametersToCheck = Zotero_Proxy_schemeParameters;
if(this.multiHost) parametersToCheck["%h"] = "([a-zA-Z0-9]+\\.[a-zA-Z0-9\.]+)";
- indices = this.indices = {};
+ var indices = this.indices = {};
this.parameters = [];
for(var param in parametersToCheck) {
var index = this.scheme.indexOf(param);
// avoid escaped matches
- while(this.scheme[index-1] == "%") {
+ while(this.scheme[index-1] && (this.scheme[index-1] == "%")) {
this.scheme = this.scheme.substr(0, index-1)+this.scheme.substr(index);
index = this.scheme.indexOf(param, index+1);
}
@@ -402,9 +402,9 @@ Zotero.Proxy.prototype.erase = function() {
*/
Zotero.Proxy.prototype.toProper = function(m) {
if(this.multiHost) {
- properURL = "http://"+m[this.parameters.indexOf("%h")+1]+"/";
+ var properURL = "http://"+m[this.parameters.indexOf("%h")+1]+"/";
} else {
- properURL = "http://"+this.hosts[0]+"/";
+ var properURL = "http://"+this.hosts[0]+"/";
}
if(this.indices["%p"]) {