{ "translatorID": "18bc329c-51af-497e-a7cf-aa572fae363d", "label": "Archives Canada", "creator": "Adam Crymble", "target": "^https?://(www\\.)?archivescanada\\.ca", "minVersion": "3.0", "maxVersion": "", "priority": 100, "inRepository": true, "translatorType": 4, "browserSupport": "gcsb", "lastUpdated": "2013-12-07 15:18:12" } function detectWeb (doc, url) { if (doc.location.href.match("RouteRqst")) { return "multiple"; } else if (doc.location.href.match("ItemDisplay")) { return "book"; } } function associateData (newItem, dataTags, field, zoteroField) { if (dataTags[field]) { newItem[zoteroField] = dataTags[field]; } } function scrape(doc, url) { var dataTags = new Object(); var tagsContent = new Array(); var cainNo; var newItem = new Zotero.Item("book"); var data = doc.evaluate('//td/p', doc, null, XPathResult.ANY_TYPE, null); var dataCount = doc.evaluate('count (//td/p)', doc, null, XPathResult.ANY_TYPE, null); for (i=0; i