{ "translatorID": "b662c6eb-e478-46bd- bad4-23cdfd0c9d67", "label": "JurPC", "creator": "Oliver Vivell and Michael Berkowitz", "target": "^https?://www\\.jurpc\\.de/jurpc/show\\?id=", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", "lastUpdated": "2021-06-07 18:03:03" } function detectWeb(doc, url) { //prevent Zotero from throwing an error here var firstLine = ZU.xpathText(doc, '//h2[1]'); if (firstLine.indexOf("Urteil vom") != -1 || firstLine.indexOf("Beschluss vom")!=-1) { return "case"; } else { return "journalArticle"; } } function doWeb(doc, url) { var articles = new Array(); if (detectWeb(doc, url) == "journalArticle") { // Aufsatz gefunden var item = new Zotero.Item('journalArticle'); // Authors and title are in h2-elements var information = ZU.xpath(doc, '//h2'); var aus = information[0].textContent.split("/"); for (var i=0; i< aus.length ; i++) { aus[i] = aus[i].replace(/\*/, "").trim(); item.creators.push(ZU.cleanAuthor(aus[i], "author")); } item.title = ZU.trimInternal(information[1].textContent); var webdoktext = ZU.xpathText(doc, '//h3'); var year = webdoktext.match(/\/(\d{4}),/); var webdok = webdoktext.match(/Dok. (\d+)\//); if (year) item.year = year[1]; if (webdok && year) { item.volume = "WebDok " + webdok[1] + "/" + year[1]; } var doi = ZU.xpathText(doc, '//span[@class="resultinfo left"]') if (doi != null) { item.DOI = ZU.cleanDOI(doi); } item.journal = "JurPC"; item.url = url; item.language = "de-DE"; item.attachments = [{ title: "JurPC Snapshot", document: doc }]; item.complete(); } else { //Case var item = new Zotero.Item('case'); // all information about the case are stored in h2-elements. var information = doc.getElementsByTagName('h2'); var caseInformation = []; for (var i=0; i