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

This commit is contained in:
Dan Stillman 2011-09-20 12:40:03 +00:00
parent 026bce81a8
commit fb46cf23de
2 changed files with 1 additions and 14 deletions

View File

@ -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;

View File

@ -920,7 +920,7 @@ Zotero.Sync.Runner = new function () {
);
if (index == 1) {
setTimeout(buttonCallback, 1);
setTimeout(function () { buttonCallback }, 1);
}
}
}