Translator devel web - doWeb - all items instead of chosen ones
I am writing my first zotero translator - congratulations on the great how tos!
I run into one issue that I don't find information on these forums, maybe it is so basic. Which return value or inner function of doWeb is responsible for the selection?
When I run doWeb, I do correctly get a box to select items to save. But even if I select some, still all items get saved to zotero. What is missing?
function doWeb(doc, url) {
if (detectWeb(doc, url) == "multiple") {
Zotero.selectItems( getSearchResults(doc, false), function (items) {
if (!items) {
return true;
}
var articles = [];
for (var i in items) {
articles.push(i);
}
} );
}
}
I run into one issue that I don't find information on these forums, maybe it is so basic. Which return value or inner function of doWeb is responsible for the selection?
When I run doWeb, I do correctly get a box to select items to save. But even if I select some, still all items get saved to zotero. What is missing?
function doWeb(doc, url) {
if (detectWeb(doc, url) == "multiple") {
Zotero.selectItems( getSearchResults(doc, false), function (items) {
if (!items) {
return true;
}
var articles = [];
for (var i in items) {
articles.push(i);
}
} );
}
}
ZU.processDocuments(articles, scrape);
after pushing the items to the articles array.
@_Ceridwen_ : I am looking forward to see your translator, if share it with us.