{
"translatorID": "5af42734-7cd5-4c69-97fc-bc406999bdba",
"label": "Atypon Journals",
"creator": "Sebastian Karcher",
"target": "^https?://[^?#]+(/doi/((abs|abstract|full|figure|ref|citedby|book)/)?10\\.|/action/doSearch\\?)|^https?://[^/]+/toc/",
"minVersion": "3.0",
"maxVersion": "",
"priority": 270,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2019-11-02 15:43:51"
}
/*
***** BEGIN LICENSE BLOCK *****
Atypon Journals Translator
Copyright © 2011-2014 Sebastian Karcher
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.search(/^https?:\/\/[^\/]+\/toc\/|\/action\/doSearch\?/) != -1) {
return getSearchResults(doc, true) ? "multiple" : false;
}
var citLinks = ZU.xpath(doc, '//a[contains(@href, "/action/showCitFormats")]');
if (citLinks.length > 0) {
if (url.includes('/doi/book/')) {
return 'book';
}
else if (url.search(/\.ch\d+$/)!=-1){
return 'bookSection';
}
return "journalArticle";
}
}
function getSearchResults(doc, checkOnly, extras) {
var articles = {};
var container = doc.getElementsByName('frmSearchResults')[0]
|| doc.getElementsByName('frmAbs')[0];
if (!container) {
Z.debug('Atypon: multiples container not found.');
return false;
}
var rows = container.getElementsByClassName('articleEntry'),
found = false,
doiLink = 'a[contains(@href, "/doi/abs/") or contains(@href, "/doi/abstract/") or '
+ 'contains(@href, "/doi/full/") or contains(@href, "/doi/book/")]';
for (var i = 0; i