Revision 65677 of Template:JSGChapters

  • Revision slug: Template:JSGChapters
  • Revision title: Template:JSGChapters
  • Revision id: 65677
  • Created:
  • Creator: user01
  • Is current revision? No
  • Comment 76 words added
Tags: 

Revision Content

var chapterList = [
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/About",
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/JavaScript_Overview",
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Values%2c_Variables%2c_and_Literals",
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Expressions_and_Operators",
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Regular_Expressions",
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Statements",
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Functions",
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Working_with_Closures",
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Working_with_Objects",
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Inheritance",
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Working_with_Arrays",
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Iterators_and_Generators",
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Details_of_the_Object_Model",
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/LiveConnect_Overview",
  "https://developer.mozilla.org/En/E4X/Processing_XML_with_E4X"];
if ($0 is nil){
  chapterList;
}
else {
  var i = list.indexOf(chapterList, $0);
  if (i != -1){
    switch (i){
      case 0:
        chapterList[1];
        break;
      case (#chapterList) - 1:
        chapterList[(#chapterList) - 2];
        break;
      default:
        [chapterList(i - 1), chapterList(i + 1)]
    }
  }
}

Revision Source

<p><span class="script">var chapterList = [<br />
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/About",<br />
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/JavaScript_Overview",<br />
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Values%2c_Variables%2c_and_Literals",<br />
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Expressions_and_Operators",<br />
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Regular_Expressions",<br />
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Statements",<br />
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Functions",<br />
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Working_with_Closures",<br />
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Working_with_Objects",<br />
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Inheritance",<br />
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Working_with_Arrays",<br />
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Iterators_and_Generators",<br />
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Details_of_the_Object_Model",<br />
  "https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/LiveConnect_Overview",<br />
  "https://developer.mozilla.org/En/E4X/Processing_XML_with_E4X"];<br />
if ($0 is nil){<br />
  chapterList;<br />
}<br />
else {<br />
  var i = list.indexOf(chapterList, $0);<br />
  if (i != -1){<br />
    switch (i){<br />
      case 0:<br />
        chapterList[1];<br />
        break;<br />
      case (#chapterList) - 1:<br />
        chapterList[(#chapterList) - 2];<br />
        break;<br />
      default:<br />
        [chapterList(i - 1), chapterList(i + 1)]<br />
    }<br />
  }<br />
}</span></p>