{ "translatorID":"5e3e6245-83da-4f55-a39b-b712df54a935", "translatorType":4, "label":"Melvyl", "creator":"Sean Takats and Michael Berkowitz", "target":"^https?://(?:melvyl.cdlib.org|melvyl-dev.cdlib.org:8162)/F(?:/[A-Z0-9\\-]+(?:\\?.*)?$|\\?func=find|\\?func=scan)", "minVersion":"1.0.0b3.r1", "maxVersion":"", "priority":90, "inRepository":true, "lastUpdated":"2008-05-19 17:20:00" } function detectWeb(doc, url) { var singleRe = new RegExp("^https?://[^/]+/F/[A-Z0-9\-]+\?.*(?:func=full-set-set.*\&format=[0-9]{3}|func=direct)"); if(singleRe.test(doc.location.href)) { return "book"; } else { var tags = doc.getElementsByTagName("a"); for(var i=0; i 3) { ind = field[3]; if(field.length > 4) { ind += field[4]; } } record.addField(code, ind, value); } } var newItem = new Zotero.Item(); record.translate(newItem); var domain = url.match(/https?:\/\/([^/]+)/); newItem.repository = domain[1]+" Library Catalog"; newItem.complete(); }, function() { Zotero.done(); }, null); Zotero.wait(); }