{ "translatorID": "43a53465-0354-42fd-aba9-dc1af8be7061", "label": "Isidore", "creator": "Guillaume Adreani and Aurimas Vinckevicius", "target": "^https?://(www\\.)?rechercheisidore\\.fr/search(/resource/|\\?)", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", "lastUpdated": "2017-01-01 15:22:12" } var typeMap = { 'Articles': 'journalArticle', 'Actualités': 'newspaperArticle', 'Billets de blog' : 'blogPost', 'Colloques et conférences': 'conferencePaper', "Livres et chapitres d'ouvrages" : 'book', 'Manuscrits': 'manuscript', 'Mémoires, Thèses et HDR': 'thesis', 'Ouvrages': 'book', 'Page Web': 'webpage', 'Photos et images': 'artwork' }; function getSearchResults(doc) { return ZU.xpath(doc, '//div[@class="ressource_bloc"]\ [./p[@class="titre_ressource"]\ and ./p[not(@class)][1]/a[not(@onclick)][1]/@href]'); } function detectWeb(doc, url) { if (getSearchResults(doc).length) return "multiple"; var type = ZU.xpathText(doc, '//meta[@name="DC.type"]/@content'); //Z.debug(type); if (type) return typeMap[type] || 'journalArticle'; //default to journalArticle if we can't recognize it } function doWeb(doc, url) { var type = detectWeb(doc, url); if (type == 'multiple') { var res = getSearchResults(doc); var items = {}; var title, href; for (var i=0, n=res.length; i