{
"translatorID": "a14ac3eb-64a0-4179-970c-92ecc2fec992",
"label": "Scopus",
"creator": "Michael Berkowitz, Rintze Zelle and Avram Lyon",
"target": "^https?://www\\.scopus\\.com[^/]*",
"minVersion": "2.1",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsib",
"lastUpdated": "2018-09-26 16:28:30"
}
/*
Scopus Translator
Copyright (C) 2008-2018 Center for History and New Media and Sebastian Karcher
This program 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.
This program 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 General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
*/
function attr(docOrElem,selector,attr,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.getAttribute(attr):null}function text(docOrElem,selector,index){var elem=index?docOrElem.querySelectorAll(selector).item(index):docOrElem.querySelector(selector);return elem?elem.textContent:null}
function detectWeb(doc, url) {
if (url.includes("/results/") && getSearchResults(doc, true)) {
return "multiple";
} else if (url.includes("/record/")) {
return "journalArticle";
}
}
function getEID(url) {
return url.match(/eid=([^&]+)/)[1];
}
function getSearchResults(doc, checkOnly) {
var items = {};
var found = false;
var rows = doc.querySelectorAll('tr[id *= resultDataRow] td a[title = "Show document details"]');
for (var i=0; i