{ "translatorID": "ecddda2e-4fc6-4aea-9f17-ef3b56d7377a", "label": "arXiv.org", "creator": "Sean Takats and Michael Berkowitz", "target": "^https?://(?:[^\\.]+\\.)?(?:(?:arxiv\\.org|xxx.lanl.gov)/(?:find/\\w|list/\\w|abs/)|eprintweb.org/S/(?:search|archive|article)(?!.*(?:refs|cited)$))", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsv", "lastUpdated": "2014-06-07 08:29:23" } function detectWeb(doc, url) { var searchRe = /^https?:\/\/(?:([^\.]+\.))?(?:(?:arxiv\.org|xxx\.lanl\.gov)\/(?:find|list)|eprintweb.org\/S\/(?:archive|search$))/; if(searchRe.test(url)) { return "multiple"; } else { return "journalArticle"; } } function doWeb(doc, url) { if(detectWeb(doc, url) == 'multiple') { var rows = ZU.xpath(doc, '//div[@id="dlpage"]/dl/dt'); var getTitleId; if(rows.length) { // arXiv.org format getTitleId = function(row) { var id = ZU.xpathText(row, './/a[@title="Abstract"]').trim().substr(6); // Trim off arXiv: var title = ZU.trimInternal( ZU.xpathText(row, './following-sibling::dd[1]//div[@class="list-title"]/text()[last()]')); return { title: title, id: id }; }; } else if( (rows = ZU.xpath(doc, '//table/tbody/tr[./td[@class="lti"]]')).length ) { // eprintweb.org format getTitleId = function(row) { var title = ZU.trimInternal(ZU.xpathText(row, './td')); var id = ZU.xpathText(row, './following-sibling::tr[.//a][1]/td/b').trim().substr(6); return { title: title, id: id }; }; } else { throw new Error("Unrecognized multiples format"); } var items = {}; for(var i=0; i0) { newItem.abstractNote = ZU.trimInternal(descriptions[0].textContent); for(var j=1; j