{
"translatorID": "2a5dc3ed-ee5e-4bfb-baad-36ae007e40ce",
"label": "DeGruyter",
"creator": "Sebastian Karcher",
"target": "^https?://www\\.degruyter\\.com",
"minVersion": "2.1.9",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsib",
"lastUpdated": "2017-08-28 07:31:18"
}
/*
DeGruyter (Replacing BE Press - based on BioMed Central Translator)
Copyright (C) 2012 Sebastian Karcher and Avram Lyon, ajlyon@gmail.com
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 Affero 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 detectWeb(doc,url) {
if ( doc.body.classList.contains('journalArticle') || doc.body.classList.contains('page-viewdatabaseentry') ) {
return "journalArticle";
}
if ( doc.body.classList.contains('page-viewbook') || doc.body.classList.contains('page-viewbooktoc')) {
return "book";
}
if (doc.body.classList.contains('page-viewbookchapter')) {
return "bookSection";
}
if ( (doc.body.classList.contains('page-search') || doc.body.classList.contains('page-searchwithinbase') || doc.body.classList.contains('page-databasecontent') || doc.body.classList.contains('page-viewjournalissue')) && getSearchResults(doc, url)) {
return "multiple";
}
//page-viewjournal --> full/whole journal (type in Zotero is planned)
return false;
}
function getSearchResults(doc, url) {
var items = {}, found = false, title;
var results = doc.getElementsByClassName('contentItem');
var searchEnvironment = doc.body.classList.contains('page-search') || doc.body.classList.contains('page-searchwithinbase') || doc.body.classList.contains('page-databasecontent');
for (var i=0; i 0) {
for (var i=0; i