{ "translatorID": "73be930f-5773-41b2-a7a1-37c0eeade92f", "label": "OZON.ru", "creator": "Mikhail Akimov", "target": "^https?://www\\.ozon\\.ru/(context/detail/id/|\\?context=search)", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", "lastUpdated": "2017-01-04 20:51:33" } /* OZON.ru Translator Copyright (C) 2015 Mikhail Akimov Copyright (C) 2017 Philipp Zumstein 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.xpathText(doc, '//div[contains(@class, "bContentColumn")]/script[contains(., "Core.Namespace.exp")]')) { return "book"; } else if (getSearchResults(doc, true)) { return "multiple"; } } function getSearchResults(doc, checkOnly) { var items = {}; var found = false; var rows = ZU.xpath(doc, '//a[@itemprop="url" and contains(@href, "/context/detail/id/")]'); for (var i=0; i