Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision |
dev:translators:coding [2017/12/07 13:49] – Remove Zotero 5 warning bwiernik | dev:translators:coding [2018/09/27 19:59] – [detectWeb] adamsmith |
---|
===== detectWeb ===== | ===== detectWeb ===== |
| |
''detectWeb'' is run to determine whether item metadata can indeed be retrieved from the webpage. The return value of this function should be the detected item type (e.g. "journalArticle", see the [[http://gsl-nagoya-u.net/http/pub/csl-fields/index.html|overview of Zotero item types]]), or, if multiple items are found, "multiple". | ''detectWeb'' is run to determine whether item metadata can indeed be retrieved from the webpage. The return value of this function should be the detected item type (e.g. "journalArticle", see the [[https://aurimasv.github.io/z2csl/typeMap.xml|overview of Zotero item types]]), or, if multiple items are found, "multiple". |
| |
''detectWeb'' receives two arguments, the webpage document object and URL (typically named ''doc'' and ''url''). In some cases, the URL provides all the information needed to determine whether item metadata is available, allowing for a simple ''detectWeb'' function, e.g. (example from ''Cell Press.js''): | ''detectWeb'' receives two arguments, the webpage document object and URL (typically named ''doc'' and ''url''). In some cases, the URL provides all the information needed to determine whether item metadata is available, allowing for a simple ''detectWeb'' function, e.g. (example from ''Cell Press.js''): |