commit fb46cf23dee9e8a66b41b92086c8be21322a0a1c
parent 026bce81a8f59c0f6da2ea77d17c3699546a7587
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 20 Sep 2011 12:40:03 +0000
A couple tweaks for the AMO validator: remove unused function that made a synchronous HTTP request and wrap a setTimeout() callback to clarify that it's a function rather than a string
Diffstat:
2 files changed, 1 insertion(+), 14 deletions(-)
diff --git a/chrome/content/zotero/xpcom/commons.js b/chrome/content/zotero/xpcom/commons.js
@@ -346,19 +346,6 @@ Zotero.Commons = new function() {
}
- this.createUnauthenticatedRequest = function (method, resource, headers) {
- var req = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"]
- .createInstance(Components.interfaces.nsIXMLHttpRequest);
- req.open(method, Zotero.Commons.apiUrl + resource, false);
-
- for(var header in headers) {
- req.setRequestHeader(header, headers[header]);
- }
-
- return req;
- }
-
-
// Recursively add files and directories to zipWriter
this.zipDirectory = function (rootDir, dir, zipWriter) {
dir = dir.directoryEntries;
diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js
@@ -920,7 +920,7 @@ Zotero.Sync.Runner = new function () {
);
if (index == 1) {
- setTimeout(buttonCallback, 1);
+ setTimeout(function () { buttonCallback }, 1);
}
}
}