{ "translatorID": "ab5983ab-6ad9-4060-aff1-4b455c89a3b3", "label": "Figshare", "creator": "Sebatian Karcher", "target": "^https?://figshare\\.com/", "minVersion": "1.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsb", "lastUpdated": "2017-06-20 03:57:47" } /* ***** BEGIN LICENSE BLOCK ***** Figshare translator Copyright © 2013-2016 Sebastian Karcher 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 ((url.indexOf("search?q") != -1 || url.indexOf("/browse") != -1 || url.indexOf("/categories/") != -1) && getSearchResults(doc, true)) { return "multiple"; } else if (url.indexOf("/article") != -1) { //no great item type here - switch once we have dataset. return "document"; } } function getSearchResults(doc, checkOnly) { var items = new Object(); var found = false; //skip collections here var titles = ZU.xpath(doc, '//div[@class="item-title" and not(contains(@href, "/collections/"))]'); //Z.debug(titles.length) for (var i = 0; i