www

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

commit 99bef356caa4e59fb98a22aff6f39c4b87701439
parent 893bbc2c899d2eb4a4925867f5df75b001ec051b
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sun,  8 Feb 2009 22:11:12 +0000

Updated ARTstor and National Library of Australia (new catalog) to use JSON.parse() instead of eval() -- this will only work in Firefox 3.1, but JSON parsing isn't otherwise available in the sandbox in 1.0.9

Pushed to clients


Diffstat:
Mrepotime.txt | 2+-
Mtranslators/ARTstor.js | 4++--
Mtranslators/National Library of Australia (new catalog).js | 5++---
3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/repotime.txt b/repotime.txt @@ -1 +1 @@ -2009-02-03 05:45:00 +2009-02-08 22:10:00 diff --git a/translators/ARTstor.js b/translators/ARTstor.js @@ -8,7 +8,7 @@ "maxVersion":"", "priority":100, "inRepository":true, - "lastUpdated":"2008-09-02 13:55:00" + "lastUpdated":"2009-02-08 22:10:00" } function detectWeb(doc, url) { @@ -50,7 +50,7 @@ function scrape(doc, url){ } // Initial query to get results from the service - primary purpose is to get objectids. which in turn are required for the 2nd service call, which exposes the actual metadata Zotero.Utilities.HTTP.doGet(urlstub + "secure/" + groupname + "//" + groupid, function(text) { - json = eval("(" + text + ")"); + var json = JSON.parse(text); items = new Object(); for(var i=0; i<json.thumbnails.length; i++) { child = json.thumbnails[i]; diff --git a/translators/National Library of Australia (new catalog).js b/translators/National Library of Australia (new catalog).js @@ -8,7 +8,7 @@ "maxVersion":"", "priority":100, "inRepository":true, - "lastUpdated":"2009-01-08 08:19:07" + "lastUpdated":"2009-02-08 22:10:00" } function detectWeb(doc, url) { @@ -61,8 +61,7 @@ function as_array(obj) { function load_item(responseText, requestObject, format) { - metadata = eval("(" + Zotero.Utilities.cleanString(responseText) + ")"); - + var metadata = JSON.parse(Zotero.Utilities.cleanString(responseText)); var newItem = new Zotero.Item(format); /* load in our authors */