{
"translatorID": "f6279abd-ab60-4aad-bdb0-20137279cd19",
"label": "La Croix",
"creator": "Philipp Zumstein",
"target": "^https?://www\\.la-croix\\.com",
"minVersion": "3.0.4",
"maxVersion": "",
"priority": 100,
"inRepository": true,
"translatorType": 4,
"browserSupport": "gcsibv",
"lastUpdated": "2016-11-03 20:18:42"
}
/*
***** BEGIN LICENSE BLOCK *****
Copyright © 2016 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) {
if (ZU.xpath(doc, '//div[@data-article-id]').length>0) {
return "newspaperArticle";
} else if (getSearchResults(doc, true)) {
return "multiple";
}
}
function getSearchResults(doc, checkOnly) {
var items = {};
var found = false;
var rows = ZU.xpath(doc, '//div[contains(@class, "item")]/a[h2|h3|h4]');
for (var i=0; i0) {
var authorPart = bylineNodes[0].textContent.split(",")[0];
//e.g. Séverin Husson et Emmanuelle Réju, le 19/01/2016 à 10h08
//e.g. François d’Alançon (envoyé spécial à Damas)
var authorPart = authorPart.replace(/\([^\)]*\)/, "").trim();
//Z.debug(authorPart);
var authors = authorPart.split(/, | et /);
for (var i=0; i