{
"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": "2014-10-04 22:19:55"
}
/*
Atypon Journals Translator
Copyright (C) 2011-2014 Sebastian Karcher
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU 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 General Public License
along with this program. If not, see .
*/
function detectWeb(doc, url) {
if (url.search(/^https?:\/\/[^\/]+\/toc\/|\/action\/doSearch\?/) != -1) {
return getSearchResults(doc, true) ? "multiple" : false;
}
if (url.indexOf('/doi/book/') != -1) {
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