Differences
This shows you the differences between two versions of the page.
dev:translators:functions [2016/10/31 13:33] zuphilip Add Zotero.Utilities.strToISO |
dev:translators:functions [2017/11/12 19:53] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Functions and objects in the translator sandbox ====== | ||
- | This is a list of the functions and objects exposed to translators running in the sandbox. As it was generated from the existing translators, this list is probably not complete, and some of the functions may be deprecated or unavailable in certain types of translators. Most of the below are described in the general [[dev:translators:coding|Translator Coding documentation]], or the [[dev:translators|Translator overview]]. Others are rarely used-- search in the code of existing translators for usage guidance. | ||
- | === Objects === | ||
- | * Zotero.Collection | ||
- | * Zotero.Item | ||
- | |||
- | === Functions === | ||
- | * Zotero.debug | ||
- | * <del>Zotero.done</del> [[dev:client_coding:changes_in_zotero_3.0#zoterodone_and_zoterowait_are_deprecated|DEPRECATED since 3.0]] | ||
- | * Zotero.getOption | ||
- | * Zotero.getXML | ||
- | * Zotero.loadTranslator | ||
- | * Zotero.monitorDOMChanges [[https://www.zotero.org/support/4.0_changelog#developer-specific_changesfixes12|NEW since 4.0]] | ||
- | * Zotero.nextCollection | ||
- | * Zotero.nextItem | ||
- | * Zotero.read | ||
- | * Zotero.selectItems | ||
- | * Zotero.setCharacterSet | ||
- | * Zotero.setProgress | ||
- | * <del>Zotero.wait</del> [[dev:client_coding:changes_in_zotero_3.0#zoterodone_and_zoterowait_are_deprecated|DEPRECATED since 3.0]] | ||
- | * Zotero.write | ||
- | |||
- | === Utility functions === | ||
- | * Zotero.Utilities.capitalizeTitle | ||
- | * Zotero.Utilities.cleanAuthor | ||
- | * Zotero.Utilities.cleanTags | ||
- | * Zotero.Utilities.createContextObject | ||
- | * Zotero.Utilities.doGet | ||
- | * Zotero.Utilities.doPost | ||
- | * Zotero.Utilities.formatDate | ||
- | * Zotero.Utilities.gatherElementsOnXPath | ||
- | * Zotero.Utilities.getCreatorsForType | ||
- | * Zotero.Utilities.getItemArray | ||
- | * Zotero.Utilities.getLocalizedCreatorType | ||
- | * Zotero.Utilities.getPageRange | ||
- | * Zotero.Utilities.getVersion | ||
- | * Zotero.Utilities.htmlSpecialChars | ||
- | * Zotero.Utilities.HTTP.doGet | ||
- | * Zotero.Utilities.HTTP.doPost | ||
- | * Zotero.Utilities.itemTypeExists | ||
- | * Zotero.Utilities.loadDocument | ||
- | * Zotero.Utilities.lpad | ||
- | * Zotero.Utilities.parseContextObject | ||
- | * Zotero.Utilities.processAsync | ||
- | * Zotero.Utilities.processDocuments | ||
- | * Zotero.Utilities.removeDiacritics [[dev:client_coding:changes_in_zotero_3.0#zuremovediacritics|NEW since 3.0]] | ||
- | * <del>Zotero.Utilities.retrieveDocument</del> [[dev:client_coding:changes_in_zotero_3.0#retrievesource_and_retrievedocument_are_unavailable|unavailable since 3.0]] | ||
- | * <del>Zotero.Utilities.retrieveSource</del> [[dev:client_coding:changes_in_zotero_3.0#retrievesource_and_retrievedocument_are_unavailable|unavailable since 3.0]] | ||
- | * Zotero.Utilities.strToDate | ||
- | * Zotero.Utilities.strToISO | ||
- | * Zotero.Utilities.superCleanString | ||
- | * Zotero.Utilities.text | ||
- | * <del>Zotero.Utilities.trim</del> DEPRECATED use ".trim()" instead | ||
- | * Zotero.Utilities.trimInternal | ||
- | * Zotero.Utilities.unescapeHTML | ||
- | * Zotero.Utilities.xpath [[dev:client_coding:changes_in_zotero_2.1#xpath_utility_functions|NEW since 2.1]] | ||
- | * Zotero.Utilities.xpathText [[dev:client_coding:changes_in_zotero_2.1#xpath_utility_functions|NEW since 2.1]] | ||
- | The utility functions are defined in [[https://github.com/zotero/zotero/blob/4.0/chrome/content/zotero/xpcom/utilities.js|utilities.js]]. | ||
- | |||
- | === RDF functions === | ||
- | * Zotero.RDF.addContainerElement | ||
- | * Zotero.RDF.addNamespace | ||
- | * Zotero.RDF.addStatement | ||
- | * Zotero.RDF.getAllResources | ||
- | * <del>Zotero.RDF.getArcsIn</del> DEPRECATED since 2.1, use Z.RDF.getStatementsMatching(undefined, undefined, .) | ||
- | * <del>Zotero.RDF.getArcsOut</del> DEPRECATED since 2.1, use Z.RDF.getStatementsMatching(., undefined, undefined) | ||
- | * Zotero.RDF.getContainerElements | ||
- | * Zotero.RDF.getResourceURI | ||
- | * <del>Zotero.RDF.getSources</del> DEPRECATED since 2.1, use Z.RDF.getStatementsMatching(undefined, ., .) | ||
- | * Zotero.RDF.getStatementsMatching | ||
- | * <del>Zotero.RDF.getTargets</del> DEPRECATED since 2.1, use Z.RDF.getStatementsMatching(., ., undefined) | ||
- | * Zotero.RDF.newContainer | ||
- | * Zotero.RDF.newResource | ||
- | The RDF functions are defined in [[https://github.com/zotero/zotero/blob/4.0/chrome/content/zotero/xpcom/translation/translate.js|translator.js]]. | ||
- | |||
- | === XML objects === | ||
- | * DOMParser | ||
- | * XML |