changeset 4:d004395e7606

Oops, forgot to add index.js from the parchment svn repo.
author Atul Varma <varmaa@toolness.com>
date Tue, 27 May 2008 23:52:37 -0700
parents f6395490cd7d
children 892bcd85b96f
files index.js
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/index.js	Tue May 27 23:52:37 2008 -0700
@@ -0,0 +1,18 @@
+function processData(stories) {
+  var parchment = "parchment.html";
+
+  if ($("script:last").attr("src").indexOf(".min") != -1)
+    parchment = "parchment.min.html";
+
+  for (var i = 0; i < stories.length; i++) {
+    $("#content").append(
+      '<div class="story"><a href="' + parchment + '?story=' +
+      stories[i].path +
+      '">' + stories[i].desc.entityify() + '</a></div>'
+    );
+  }
+}
+
+$(document).ready(function() {
+  processData(stories);
+});