var search =ZU.xpath(doc, '//div[contains(@class, "article-list")]/div[@ng-transclude]')[0];
if (!search) {
Zotero.debug("No search scope");
// Search results
if (url.includes("/search/searchresult.jsp")) {
return"multiple";
}
// more generic method for other cases (is this still needed?)
/*
var scope = ZU.xpath(doc, '//div[contains(@class, "ng-scope")]')[0];
if (!scope) {
Zotero.debug("No scope");
return;
}
Z.monitorDOMChanges(search, {childList:true});
Z.monitorDOMChanges(scope, {childList: true});
if (getSearchResults(doc, true)) {
return "multiple";
}
*/
}
functiongetSearchResults(doc, checkOnly) {
var items = {};
var found =false;
var rows =ZU.xpath(doc, '//*[contains(@class, "article-list") or contains(@class, "List-results-items")]//a[contains(@ng-bind-html, "::record.title")]|//*[@id="results-blk"]//*[@class="art-abs-url"]');
var rows =ZU.xpath(doc, '//*[contains(@class, "article-list") or contains(@class, "List-results-items")]//h2/a|//*[@id="results-blk"]//*[@class="art-abs-url"]');
0 comments on commit
6a9c507