diff daily-edition.js @ 47:d79bf2ee77f5

just use eval() if JSON isn't available.
author Atul Varma <varmaa@toolness.com>
date Mon, 29 Mar 2010 00:28:27 +0000
parents 8cb5e556960b
children 13565a96f005
line wrap: on
line diff
--- a/daily-edition.js	Sun Mar 28 23:05:59 2010 +0000
+++ b/daily-edition.js	Mon Mar 29 00:28:27 2010 +0000
@@ -12,7 +12,13 @@
     req.addEventListener(
       "load",
       function(event) {
-        var info = JSON.parse(req.responseText);
+        var info;
+
+        if (window.JSON)
+          info = JSON.parse(req.responseText);
+        else
+          info = eval("(" + req.responseText + ");");
+
         req = null;
 
         $("#issue-no").text(info.id + 1);