{
"translatorID": "f46cc903-c447-47d6-a2cf-c75ed22dc96b",
"label": "Cairn.info",
"creator": "Sebastian Karcher, Sylvain Machefert and Nicolas Chachereau",
"target": "^https?://www\\.cairn\\.info/",
"minVersion": "3.0",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2018-03-17 13:48:44"
}
/*
Translator
Copyright (C) 2013 Sebastian Karcher
This program 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.
This program 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 this program. If not, see .
*/
function detectWeb(doc,url) {
breadcrumbPage = ZU.xpathText(doc, '//div[@id="breadcrump"]/a[last()]');
if (breadcrumbPage == "Ouvrage collectif") {
return "book";
} else if (breadcrumbPage == "Article") {
return "journalArticle";
} else if (breadcrumbPage == "Chapitre") {
return "bookSection";
} else if (breadcrumbPage == "Résumé") {
typeDocument = ZU.xpathText(doc, '//div[@id="breadcrump"]/a[2]');
if (typeDocument == "Revues") {
return "journalArticle";
} else if (typeDocument == "Ouvrages") {
return "bookSection";
}
}
if (ZU.xpathText(doc, '//div[contains(@class, "list_articles")]//div[contains(@class, "article") or contains(@class, "articleBookList")]')) {
return "multiple";
}
}
function doWeb(doc,url) {
if (detectWeb(doc, url) == "multiple") {
var hits = {};
var urls = [];
var title;
var link;
var resultsrow = ZU.xpath(doc, '//div[contains(@class, "list_articles")]/div[contains(@class, "article")]');
for (var i=0; i