diff annotator_files/lib/extensions.js @ 4:6979313586cf

new version of annotator.
author casties
date Mon, 27 Aug 2012 19:05:38 +0200
parents 6356e78ccf5c
children
line wrap: on
line diff
--- a/annotator_files/lib/extensions.js	Thu Apr 05 19:37:27 2012 +0200
+++ b/annotator_files/lib/extensions.js	Mon Aug 27 19:05:38 2012 +0200
@@ -1,3 +1,4 @@
+// Generated by CoffeeScript 1.3.3
 var $, gettext, _gettext, _ref, _t;
 
 gettext = null;
@@ -91,7 +92,7 @@
     elem = this;
     while (elem && elem.nodeType === 1 && elem !== relativeRoot) {
       idx = $(elem.parentNode).children(elem.tagName).index(elem) + 1;
-      idx = idx > 1 ? "[" + idx + "]" : "";
+      idx = "[" + idx + "]";
       path = "/" + elem.tagName.toLowerCase() + idx + path;
       elem = elem.parentNode;
     }
@@ -105,6 +106,10 @@
 };
 
 $.fn.escape = function(html) {
-  if (arguments.length) return this.html($.escape(html));
+  if (arguments.length) {
+    return this.html($.escape(html));
+  }
   return this.html();
 };
+
+$.fn.reverse = [].reverse;