We’re in the process of updating the documentation for Zotero 5.0. Some documentation may be outdated in the meantime. Thanks for your understanding.
- When using XPaths to locate page elements, try to avoid absolute paths that might break easily. For example, instead of using
try a more flexible XPath like
- When writing translators, debugging via the console is essential. Unfortunately, this is slow and ugly in Windows. It is better in Windows to use the debug log accessible through the Zotero preferences pane, under “advanced”. Don't forget to turn off debug logging after you are through with a translator-writing session. To debug via the console, start Firefox from the command line (Terminal.app in MacOS). Any output from the translator can be dumped to the console using
- The functions
Zotero.Utilities.processDocumentsrun asynchronously. In order to allow them to complete before moving along, follow either function with
Zotero.done()as the onDone in order to signal the translator that it has completed its asynchronous operations.