{
"translatorID": "fa396dd4-7d04-4f99-95e1-93d6f355441d",
"label": "CiteSeer",
"creator": "Sebastian Karcher, Guy Aglionby",
"target": "^https?://citeseerx?\\.ist\\.psu\\.edu",
"minVersion": "3.0",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2018-01-28 16:31:16"
}
/*
***** BEGIN LICENSE BLOCK *****
Copyright © 2018 Sebastian Karcher, Guy Aglionby
This file is part of Zotero.
Zotero is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Zotero is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Zotero. If not, see .
***** END LICENSE BLOCK *****
*/
function detectWeb(doc, url) {
if ((url.includes('/search') || url.includes('/showciting')) && getSearchResults(doc).length) {
return "multiple";
}
//for running the tests with book example
if (url == "http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.332.356&rank=1") return "book";
if ((url.includes('/viewdoc/') && doc.getElementById('bibtex'))
|| url.includes('/download?doi=')) {
return "journalArticle";
}
}
function getSearchResults(doc) {
return ZU.xpath(doc, '//div[@class="result"]/h3/a');
}
function doWeb(doc, url) {
var articles = [];
if (detectWeb(doc, url) == "multiple") {
var items = {};
var titles = getSearchResults(doc);
for (var i=0; i