{ "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": "2014-04-28 21:06:26" } var typeMap = { 'Articles': 'journalArticle', 'Ouvrages': 'book', 'Actualités': 'newspaperArticle', 'Colloques et conférences': 'conferencePaper', 'Mémoires, Thèses et HDR': 'thesis', 'Page Web': 'webpage', 'Photos et images': 'artwork', 'Manuscrits': 'manuscript' }; 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'); 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