Could you remove the callback here (the function that calls `Zotero.done()`? (I know you didn't put it in, but since you're tweaking this anyway). Also, remove the `Zotero.wait()` below. They're both mostly deprecated.