www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 3888e195399c1306ecea9a7e3d47829ec5f959cf
parent d06a19b6a8a9124ddb3b358e970b77072d92eea9
Author: Simon Kornblith <simon@simonster.com>
Date:   Thu, 23 Sep 2010 04:20:06 +0000

commit Zotero Connector-compatible COinS, unAPI, and Embedded RDF


Diffstat:
Mtranslators/COinS.js | 3++-
Mtranslators/Embedded RDF.js | 5+++--
Mtranslators/unAPI.js | 3++-
3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/translators/COinS.js b/translators/COinS.js @@ -8,7 +8,8 @@ "maxVersion":"", "priority":300, "inRepository":true, - "lastUpdated":"2010-09-15 18:42:44" + "detectXPath":"//span[contains(@class, ' Z3988') or contains(@class, 'Z3988 ') or @class='Z3988'][@title]" + "lastUpdated":"2010-09-23 04:19:20" } function detectWeb(doc, url) { diff --git a/translators/Embedded RDF.js b/translators/Embedded RDF.js @@ -8,7 +8,8 @@ "maxVersion":"", "priority":400, "inRepository":true, - "lastUpdated":"2009-05-27 08:06:05" + "detectXPath":"//meta[substring(@name, 1, 3)='dc.'] | //link[substring(@rel, 1, 7)='schema.']", + "lastUpdated":"2010-09-23 04:19:20" } var _prefix; @@ -45,7 +46,7 @@ function detectWeb(doc, url) { var metaTags = doc.getElementsByTagName("meta"); for(var i=0; i<metaTags.length; i++) { var tag = metaTags[i].getAttribute("name"); - if(tag && tag.substr(0, 3).toLowerCase() == prefix) { + if(tag && tag.substr(0, prefix.length).toLowerCase() == prefix) { return "webpage"; } } diff --git a/translators/unAPI.js b/translators/unAPI.js @@ -8,7 +8,8 @@ "maxVersion":"", "priority":200, "inRepository":true, - "lastUpdated":"2010-09-15 18:42:44" + "detectXPath":"//link[@rel='unapi-server']", + "lastUpdated":"2010-09-23 04:19:20" } var RECOGNIZABLE_FORMATS = ["mods", "marc", "endnote", "ris", "bibtex", "rdf"];