{ "translatorID": "e4660e05-a935-43ec-8eec-df0347362e4c", "label": "ERIC", "creator": "Sebastian Karcher", "target": "^https?://(www\\.)?eric\\.ed\\.gov/", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsibv", "lastUpdated": "2017-03-17 05:58:32" } /* Translator Copyright (C) 2013 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) { var hasTitle = doc.querySelector("meta[name=citation_title]"); if (hasTitle) { var type = doc.querySelector("meta[name=source][content]"); if (type && type.content.indexOf("Non-Journal")!=-1) { return "book"; } else { return "journalArticle"; } } else if (getSearchResults(doc, false)) { return "multiple"; } return false; } function getSearchResults(doc, checkOnly) { var items = {}; var found = false; var rows = doc.querySelectorAll("div.r_t > a[href*='id=']"); for (var i=0; i-1) { item.creators = []; var authors = authorString.split("|"); for (var i=0; i