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:
parent
026bce81a8
commit
fb46cf23de
|
@ -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
|
// Recursively add files and directories to zipWriter
|
||||||
this.zipDirectory = function (rootDir, dir, zipWriter) {
|
this.zipDirectory = function (rootDir, dir, zipWriter) {
|
||||||
dir = dir.directoryEntries;
|
dir = dir.directoryEntries;
|
||||||
|
|
|
@ -920,7 +920,7 @@ Zotero.Sync.Runner = new function () {
|
||||||
);
|
);
|
||||||
|
|
||||||
if (index == 1) {
|
if (index == 1) {
|
||||||
setTimeout(buttonCallback, 1);
|
setTimeout(function () { buttonCallback }, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user