Revert "Remove unused special page number code"
authorMichael Ang <mang@archive.org>
Thu, 10 Sep 2009 19:48:47 +0000 (19:48 +0000)
committerMichael Ang <mang@archive.org>
Thu, 10 Sep 2009 19:48:47 +0000 (19:48 +0000)
May be needed for named pages to access them by index.  Reverting for now.

This reverts commit d009b21bbcbfee26566cf694f52376ab92c6e336.

GnuBook/GnuBook.js

index 4ac756a..761eee8 100644 (file)
@@ -2957,19 +2957,17 @@ GnuBook.prototype.getPageIndex = function(pageNum) {
 GnuBook.prototype.getPageIndices = function(pageNum) {
     var indices = [];
 
-    /* Special page numbers are now generated and added so special check not needed
     // Check for special "nXX" page number
     if (pageNum.slice(0,1) == 'n') {
         try {
             var pageIntStr = pageNum.slice(1, pageNum.length);
             var pageIndex = parseInt(pageIntStr);
-            indices.push(pageIndex);
+            indices.append(pageIndex);
             return indices;
         } catch(err) {
             // Do nothing... will run through page names and see if one matches
         }
     }
-    */
 
     var i;
     for (i=0; i<this.numLeafs; i++) {