{ "translatorID": "9346ddef-126b-47ec-afef-8809ed1972ab", "label": "Institute of Physics", "creator": "Michael Berkowitz and Avram Lyon and Sebastian Karcher", "target": "^https?://iopscience\\.iop\\.org/((article/10\\.[^/]+/)?[0-9-X]+/.+|n?search\\?.+)", "minVersion": "3.0", "maxVersion": "", "priority": 99, "inRepository": true, "translatorType": 4, "browserSupport": "gcsbv", "lastUpdated": "2016-11-01 12:54:14" } /* IOP Translator Copyright (C) 2013-2015 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) { if (ZU.xpath(doc, '//meta[@name="citation_journal_title"]').length > 0) { return "journalArticle"; } else if (url.indexOf("/pdf/") == -1 && getResults(doc).length){ return "multiple"; } return false; } function getResults(doc){ return ZU.xpath(doc, '//div[@class="searchResCol1"]//h4/a|//a[contains(@class, "art-list-item-title")]'); } function doWeb(doc,url) { if (detectWeb(doc, url) == "multiple") { var hits = {}; var urls = []; //search results //var results = ZU.xpath(doc,"//table[@id='articles-list']//td[@class='article-entry']//p/strong/a"); var results = getResults(doc) for (var i =0; i