{ "translatorID": "7bdb79e-a47f-4e3d-b317-ccd5a0a74456", "label": "Factiva", "creator": "Philipp Zumstein and Aurimas Vinckevicius", "target": "^https?://(?:global\\.factiva\\.com|[^/]*\\bglobal-factiva-com\\b[^/]+)/(?:[gh]a|redir|np)/default\\.aspx", "minVersion": "4.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsv", "lastUpdated": "2014-09-06 05:15:28" } /* ***** BEGIN LICENSE BLOCK ***** Factiva Translator, Copyright © 2014 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(doc.body.classList.contains('articleView')) { // This is not sufficient for multiples, because the class does not change when filtering results Z.monitorDOMChanges(doc.body, {attributes: true, attributeFilter: ['class']}); return "newspaperArticle"; } var splitter = doc.getElementById('hldSplitter'); if (splitter) Z.monitorDOMChanges(splitter, { attributes: true, attributeFilter: ['style'] }); if (getSearchResults(doc, true)) return "multiple"; } function getSearchResults(doc, checkOnly) { var items = {}, found = false; var rows = doc.getElementById('headlines'); if (!rows) return false; rows = rows.getElementsByTagName('tr'); for(var i=0; i/g, '') .replace(/<\/?a[^>]*>/g, ''); newItem.notes.push({note:ZU.trimInternal(html)}); } var authors = new Array(); if (element["AU"]) { authors = element["AU"].split(","); } else if (element["BY"]) { var byline = ZU.trimInternal(element["BY"].replace(/By/i, "")); authors = byline.split(/(?:\&| and |,| et )/i); } for(var i=0; i seems fine as tags //industry: element["IN"] --> broad but still okay //element["NS"] --> too messy //regions: element["RE"] --> too broad, messy var tagString = element["CO"]; if (!tagString) { tagString = element["IN"]; } else if (element["IN"]) { tagString += " | "+element["IN"]; } if (tagString) { var tagArray = tagString.split("|"); for(var i=0; i