{ "translatorID": "c4008cc5-9243-4d13-8b35-562cdd184558", "label": "Delpher", "creator": "Philipp Zumstein", "target": "^https?://[^\\/]+\\.delpher\\.nl", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", "lastUpdated": "2017-05-21 03:21:00" } /* ***** BEGIN LICENSE BLOCK ***** Copyright © 2016 Philipp Zumstein 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.indexOf('view')>-1) { if (url.indexOf('boeken')>-1) { return "book"; } if (url.indexOf('tijdschriften')>-1) { return "journalArticle"; } if (url.indexOf('kranten')>-1) { return "newspaperArticle"; } if (url.indexOf('radiobulletins')>-1) { return "radioBroadcast"; } } else if (getSearchResults(doc, true)) { return "multiple"; } } function getSearchResults(doc, checkOnly) { var items = {}; var found = false; var rows = ZU.xpath(doc, '//main[contains(@class, "searchresults")]/article//a[h2[contains(@class, "title")] and starts-with(@href, "/")]'); for (var i=0; i 4) { item.date = date.replace(/(\d{2})\-(\d{2})-(\d{4})/, "$3-$2-$1"); } else item.date = date; item.publicationTitle = item.issue = ZU.xpathText(details, './/dd[@data-testing-id="search-result__papertitle"]'); item.libraryCatalog = ZU.xpathText(details, './/dd[@data-testing-id="search-result__source"]'); if (!item.libraryCatalog) item.libraryCatalog = "Delpher"; item.publisher = ZU.xpathText(details, './/dd[@data-testing-id="search-result__publisher"]/a'); item.callNumber = ZU.xpathText(details, './/dd[@data-testing-id="search-result__signature"]'); var language = ZU.xpathText(details, './/dd[@data-testing-id="search-result__language"]'); if (language) item.language = ZU.trimInternal(language); item.volume = ZU.xpathText(details, './/dd[@data-testing-id="search-result__volume"]'); item.issue = ZU.xpathText(details, './/dd[@data-testing-id="search-result__issuenumber"]'); item.edition = ZU.xpathText(details, './/dd[@data-testing-id="search-result__edition"]'); item.place = ZU.xpathText(details, './/dd[@data-testing-id="search-result__spatialCreation"]'); var tags = ZU.xpath(details, './/dd[@data-testing-id="search-result__subject"]/a'); for (var i = 0; i