{ "translatorID": "dc78e210-31da-4fe5-99d6-1ea1a61874ca", "label": "jurion", "creator": "Philipp Zumstein", "target": "^https?://www\\.recht\\.jurion\\.de/", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", "lastUpdated": "2017-01-30 20:15:34" } /* ***** BEGIN LICENSE BLOCK ***** Copyright © 2017 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) { url = decodeURI(url); if (url.indexOf('/?user_nvurlapi_pi1[did]=')>-1) { var type = ZU.xpathText(doc, '//div[contains(@class, "persist-area")]/div[contains(@class, "doc_header")]/@class'); if (type.indexOf('artikel_header')>-1) { return "journalArticle"; } if (type.indexOf('aktuelles_header')>-1) { return "newspaperArticle"; } if (type.indexOf('gesetz_header')>-1) { return "statute"; } if (type.indexOf('urteil_header')>-1) { return "case"; } if (type.indexOf('stw_header')>-1) {//lexika return "encyclopediaArticle"; } if (type.indexOf('hb_header')>-1) { return "bookSection"; } if (type.indexOf('jk_header')>-1) {//kommentar return "bookSection"; } Z.debug(type); } else if (url.indexOf('/suche/?query=')>-1 && getSearchResults(doc, true)) { return "multiple"; } } function getSearchResults(doc, checkOnly) { var items = {}; var found = false; var rows = ZU.xpath(doc, '//ul[contains(@class, "nvurlapi-result-list")]//h2/strong/a'); for (var i=0; i-1) { item.publicationTitle = journal.substring(pos+1); item.journalAbbreviation = journal.substring(0, pos); } else { item.publicationTitle = journal; } } var ref = getValueToLabel(doc, "Referenz"); if (ref) { var m = ref.match(/(\d{4}),\s+([\d\s\-IVX]*)\((.*)\)/); if (m) { //e.g. ZInsO 2010, 1959 - 1961 (Ausgabe 44 v. 28.10.2010) // ZJJ 2010, 403 - 405 (Heft 4) item.date = m[1]; item.pages = m[2].replace(/\s/g, ''); var parenthesis = m[3]; var d = parenthesis.match(/(\d\d?\.\d\d?\.\d{4})/); if (d) { item.date = ZU.strToISO(d[1]); parenthesis = parenthesis.substring(0, d.index); } if (parenthesis.indexOf('Heft')>-1 || parenthesis.indexOf('Ausgabe')>-1) { item.issue = parenthesis.replace(/\D/g, ''); } } else { //e.g. JurionRS 2012, 28843 var parts = ref.split(','); if (parts.length == 2) { item.pages = parts[1]; var space = parts[0].lastIndexOf(" "); if (space>-1) { if (type == "case") { item.reporter = parts[0].substr(0, space); item.reporterVolume = parts[0].substr(space+1); } else if (type == "newspaperArticle") { item.publicationTitle = parts[0].substr(0, space); } } } } } //case var date = getValueToLabel(doc, "Datum"); if (date) { item.date = ZU.strToISO(date); } item.court = getValueToLabel(doc, "Gericht");; item.docketNumber = getValueToLabel(doc, "Aktenzeichen");; var form = getValueToLabel(doc, "Entscheidungsform"); if (form) { item.extra = "genre: " + form; } var caseName = ZU.xpathText(doc, '//div[contains(@class, "urteil_schlagworte")]'); if (caseName && type == "case") { item.title = caseName; } //bookSection var booktitle = getValueToLabel(doc, "Titel"); if (booktitle && type == "bookSection") { item.bookTitle = booktitle; } var edition = getValueToLabel(doc, "Auflage"); if (edition) { var m = edition.match(/(\d+)\. Auflage (\d\d\d\d)/); if (m) { item.edition = m[1]; item.date = m[2]; } else { item.edition = edition; } } var editors = getValueToLabel(doc, "Herausgeber"); if (editors) { editors = editors.split(';'); for (var i=0; i