Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:client_coding:changes_in_zotero_2.1_and_zotero_standalone [2011/07/01 15:42] – [Changes to translators] simon | dev:client_coding:changes_in_zotero_2.1_and_zotero_standalone [2017/11/12 19:53] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Changes in Zotero | + | < |
+ | in the process of updating the documentation for | ||
+ | <a href=" | ||
+ | may be outdated in the meantime. Thanks for your understanding.</ | ||
- | ===== Changes to citation API ===== | ||
- | With the introduction of citeproc-js, | + | Moved to [[Changes in Zotero |
- | developers should use Zotero.Style.csl | + | |
- | + | ||
- | ===== Changes | + | |
- | + | ||
- | Zotero as a tab and Zotero Standalone have required us to further abstract the interface layer. While the code for the interface has changed little, and most overlays should continue to work, as of the present Zotero trunk, plug-ins and add-ons should now overlay zoteroPane.xul instead of browser.xul or overlay.xul in chrome.manifest, | + | |
- | + | ||
- | < | + | |
- | + | ||
- | ===== Changes to translators ===== | + | |
- | + | ||
- | * Several functions | + | |
- | + | ||
- | * Zotero.configure() and Zotero.displayOptions() no longer exist. Instead, translators should specify config and display options in the metadata block at the top of the translator, e.g. < | + | |
- | " | + | |
- | [...] | + | |
- | " | + | |
- | " | + | |
- | " | + | |
- | }</ | + | |
- | + | ||
- | * It is no longer necessary to specify " | + | |
- | + | ||
- | * Import | + | |
- | + | ||
- | ===== Changes to translate interface ===== | + | |
- | + | ||
- | New code should create new instances of the translate interface using type-specific constructors, | + | |
- | + | ||
- | < | + | |
- | + | ||
- | ===== Locate Engines ===== | + | |
- | + | ||
- | Zotero 2.1b6 and later support extensible locate engines. For further details, see [[Creating Locate Engines using OpenSearch]]. | + | |
- | + | ||
- | ====== | + | |
- | + | ||
- | ===== Changes to translators ===== | + | |
- | + | ||
- | * Calling Zotero.done() and Zotero.wait() during translation is no longer necessary. Zotero.done() is still used to indicate item type in translators that implement asynchronous detection (currently only unAPI). | + | |
- | + | ||
- | * Z is now a shortcut for Zotero in translators, | + | |
- | + | ||
- | * New utility functions: | + | |
- | * < | + | |
- | * < | + | |
- | + | ||
- | ====== Changes for Zotero Connectors ====== | + | |
- | + | ||
- | ===== Changes to translators ===== | + | |
- | Zotero Everywhere will soon allow translators to operate outside of Firefox/ | + | |
- | + | ||
- | * Firefox-specific JavaScript, with the exception of "for each", must be avoided. This includes | + | |
- | * array comprehensions | + | |
- | * destructuring assignment | + | |
- | * several other features | + | |
- | + | ||
- | * E4X functionality is not available. As of Zotero 2.1b6, Zotero also offers DOM XML interfaces to translators. Current trunk builds offer cross-browser utility functions for working with XPaths detailed above, which greatly simplify migration away from E4X. | + | |
- | + | ||
- | * Zotero.Utilities.retrieveDocument() and Zotero.Utilities.retrieveSource() should be avoided if possible. Zotero.Utilities.retrieveDocument() will throw an error outside of Firefox, whereas Zotero.Utilities.retrieveSource() will freeze the main thread and will not work across domains. Zotero.Utilities.processDocuments(), | + | |
- | + | ||
- | * Translate.getTranslatorObject() should now be called with a callback function as an argument, which will receive the translator object when it is available. This is backwards compatible with Zotero 2.1b6 and later. | + | |
- | + | ||
- | * Translators should not expect a return value from Translate.getTranslators(). Instead, they should register a " | + | |
- | + | ||
- | * Zotero.selectItems() should now be called with a callback function as an argument, which will receive the list of selected items when it is available. Translators may still use Zotero.selectItems() synchronously, | + |