<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.khuxwiki.com/w/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AMobile.js</id>
	<title>MediaWiki:Mobile.js - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.khuxwiki.com/w/index.php?action=history&amp;feed=atom&amp;title=MediaWiki%3AMobile.js"/>
	<link rel="alternate" type="text/html" href="https://www.khuxwiki.com/w/index.php?title=MediaWiki:Mobile.js&amp;action=history"/>
	<updated>2026-05-13T21:24:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://www.khuxwiki.com/w/index.php?title=MediaWiki:Mobile.js&amp;diff=76978&amp;oldid=prev</id>
		<title>TheSilentHero at 21:08, 30 May 2019</title>
		<link rel="alternate" type="text/html" href="https://www.khuxwiki.com/w/index.php?title=MediaWiki:Mobile.js&amp;diff=76978&amp;oldid=prev"/>
		<updated>2019-05-30T21:08:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;/* Any JavaScript here will be loaded for users using the mobile site */&lt;br /&gt;
&lt;br /&gt;
/*==================================================&lt;br /&gt;
  $Id: tabber.js,v 1.9 2006/04/27 20:51:51 pat Exp $&lt;br /&gt;
  tabber.js by Patrick Fitzgerald pat@barelyfitz.com&lt;br /&gt;
 &lt;br /&gt;
  Documentation can be found at the following URL:&lt;br /&gt;
  http://www.barelyfitz.com/projects/tabber/&lt;br /&gt;
 &lt;br /&gt;
  License (http://www.opensource.org/licenses/mit-license.php)&lt;br /&gt;
 &lt;br /&gt;
  Copyright (c) 2006 Patrick Fitzgerald&lt;br /&gt;
 &lt;br /&gt;
  Permission is hereby granted, free of charge, to any person&lt;br /&gt;
  obtaining a copy of this software and associated documentation files&lt;br /&gt;
  (the &amp;quot;Software&amp;quot;), to deal in the Software without restriction,&lt;br /&gt;
  including without limitation the rights to use, copy, modify, merge,&lt;br /&gt;
  publish, distribute, sublicense, and/or sell copies of the Software,&lt;br /&gt;
  and to permit persons to whom the Software is furnished to do so,&lt;br /&gt;
  subject to the following conditions:&lt;br /&gt;
 &lt;br /&gt;
  The above copyright notice and this permission notice shall be&lt;br /&gt;
  included in all copies or substantial portions of the Software.&lt;br /&gt;
 &lt;br /&gt;
  THE SOFTWARE IS PROVIDED &amp;quot;AS IS&amp;quot;, WITHOUT WARRANTY OF ANY KIND,&lt;br /&gt;
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF&lt;br /&gt;
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND&lt;br /&gt;
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS&lt;br /&gt;
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN&lt;br /&gt;
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN&lt;br /&gt;
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE&lt;br /&gt;
  SOFTWARE.&lt;br /&gt;
  ==================================================*/&lt;br /&gt;
 &lt;br /&gt;
function tabberObj(argsObj)&lt;br /&gt;
{&lt;br /&gt;
  var arg; /* name of an argument to override */&lt;br /&gt;
 &lt;br /&gt;
  /* Element for the main tabber div. If you supply this in argsObj,&lt;br /&gt;
     then the init() method will be called.&lt;br /&gt;
  */&lt;br /&gt;
  this.div = null;&lt;br /&gt;
 &lt;br /&gt;
  /* Class of the main tabber div */&lt;br /&gt;
  this.classMain = &amp;quot;tabber&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  /* Rename classMain to classMainLive after tabifying&lt;br /&gt;
     (so a different style can be applied)&lt;br /&gt;
  */&lt;br /&gt;
  this.classMainLive = &amp;quot;tabberlive&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  /* Class of each DIV that contains a tab */&lt;br /&gt;
  this.classTab = &amp;quot;tabbertab&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  /* Class to indicate which tab should be active on startup */&lt;br /&gt;
  this.classTabDefault = &amp;quot;tabbertabdefault&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  /* Class for the navigation UL */&lt;br /&gt;
  this.classNav = &amp;quot;tabbernav&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  /* When a tab is to be hidden, instead of setting display=&amp;#039;none&amp;#039;, we&lt;br /&gt;
     set the class of the div to classTabHide. In your screen&lt;br /&gt;
     stylesheet you should set classTabHide to display:none.  In your&lt;br /&gt;
     print stylesheet you should set display:block to ensure that all&lt;br /&gt;
     the information is printed.&lt;br /&gt;
  */&lt;br /&gt;
  this.classTabHide = &amp;quot;tabbertabhide&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  /* Class to set the navigation LI when the tab is active, so you can&lt;br /&gt;
     use a different style on the active tab.&lt;br /&gt;
  */&lt;br /&gt;
  this.classNavActive = &amp;quot;tabberactive&amp;quot;;&lt;br /&gt;
 &lt;br /&gt;
  /* Elements that might contain the title for the tab, only used if a&lt;br /&gt;
     title is not specified in the TITLE attribute of DIV classTab.&lt;br /&gt;
  */&lt;br /&gt;
  this.titleElements = [&amp;#039;h2&amp;#039;,&amp;#039;h3&amp;#039;,&amp;#039;h4&amp;#039;,&amp;#039;h5&amp;#039;,&amp;#039;h6&amp;#039;];&lt;br /&gt;
 &lt;br /&gt;
  /* Should we strip out the HTML from the innerHTML of the title elements?&lt;br /&gt;
     This should usually be true.&lt;br /&gt;
  */&lt;br /&gt;
  this.titleElementsStripHTML = true;&lt;br /&gt;
 &lt;br /&gt;
  /* If the user specified the tab names using a TITLE attribute on&lt;br /&gt;
     the DIV, then the browser will display a tooltip whenever the&lt;br /&gt;
     mouse is over the DIV. To prevent this tooltip, we can remove the&lt;br /&gt;
     TITLE attribute after getting the tab name.&lt;br /&gt;
  */&lt;br /&gt;
  this.removeTitle = true;&lt;br /&gt;
 &lt;br /&gt;
  /* If you want to add an id to each link set this to true */&lt;br /&gt;
  this.addLinkId = false;&lt;br /&gt;
 &lt;br /&gt;
  /* If addIds==true, then you can set a format for the ids.&lt;br /&gt;
     &amp;lt;tabberid&amp;gt; will be replaced with the id of the main tabber div.&lt;br /&gt;
     &amp;lt;tabnumberzero&amp;gt; will be replaced with the tab number&lt;br /&gt;
       (tab numbers starting at zero)&lt;br /&gt;
     &amp;lt;tabnumberone&amp;gt; will be replaced with the tab number&lt;br /&gt;
       (tab numbers starting at one)&lt;br /&gt;
     &amp;lt;tabtitle&amp;gt; will be replaced by the tab title&lt;br /&gt;
       (with all non-alphanumeric characters removed)&lt;br /&gt;
   */&lt;br /&gt;
  this.linkIdFormat = &amp;#039;&amp;lt;tabberid&amp;gt;nav&amp;lt;tabnumberone&amp;gt;&amp;#039;;&lt;br /&gt;
 &lt;br /&gt;
  /* You can override the defaults listed above by passing in an object:&lt;br /&gt;
     var mytab = new tabber({property:value,property:value});&lt;br /&gt;
  */&lt;br /&gt;
  for (arg in argsObj) { this[arg] = argsObj[arg]; }&lt;br /&gt;
 &lt;br /&gt;
  /* Create regular expressions for the class names; Note: if you&lt;br /&gt;
     change the class names after a new object is created you must&lt;br /&gt;
     also change these regular expressions.&lt;br /&gt;
  */&lt;br /&gt;
  this.REclassMain = new RegExp(&amp;#039;\\b&amp;#039; + this.classMain + &amp;#039;\\b&amp;#039;, &amp;#039;gi&amp;#039;);&lt;br /&gt;
  this.REclassMainLive = new RegExp(&amp;#039;\\b&amp;#039; + this.classMainLive + &amp;#039;\\b&amp;#039;, &amp;#039;gi&amp;#039;);&lt;br /&gt;
  this.REclassTab = new RegExp(&amp;#039;\\b&amp;#039; + this.classTab + &amp;#039;\\b&amp;#039;, &amp;#039;gi&amp;#039;);&lt;br /&gt;
  this.REclassTabDefault = new RegExp(&amp;#039;\\b&amp;#039; + this.classTabDefault + &amp;#039;\\b&amp;#039;, &amp;#039;gi&amp;#039;);&lt;br /&gt;
  this.REclassTabHide = new RegExp(&amp;#039;\\b&amp;#039; + this.classTabHide + &amp;#039;\\b&amp;#039;, &amp;#039;gi&amp;#039;);&lt;br /&gt;
 &lt;br /&gt;
  /* Array of objects holding info about each tab */&lt;br /&gt;
  this.tabs = new Array();&lt;br /&gt;
 &lt;br /&gt;
  /* If the main tabber div was specified, call init() now */&lt;br /&gt;
  if (this.div) {&lt;br /&gt;
 &lt;br /&gt;
    this.init(this.div);&lt;br /&gt;
 &lt;br /&gt;
    /* We don&amp;#039;t need the main div anymore, and to prevent a memory leak&lt;br /&gt;
       in IE, we must remove the circular reference between the div&lt;br /&gt;
       and the tabber object. */&lt;br /&gt;
    this.div = null;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/*--------------------------------------------------&lt;br /&gt;
  Methods for tabberObj&lt;br /&gt;
  --------------------------------------------------*/&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
tabberObj.prototype.init = function(e)&lt;br /&gt;
{&lt;br /&gt;
  /* Set up the tabber interface.&lt;br /&gt;
 &lt;br /&gt;
     e = element (the main containing div)&lt;br /&gt;
 &lt;br /&gt;
     Example:&lt;br /&gt;
     init(document.getElementById(&amp;#039;mytabberdiv&amp;#039;))&lt;br /&gt;
   */&lt;br /&gt;
 &lt;br /&gt;
  var&lt;br /&gt;
  childNodes, /* child nodes of the tabber div */&lt;br /&gt;
  i, i2, /* loop indices */&lt;br /&gt;
  t, /* object to store info about a single tab */&lt;br /&gt;
  defaultTab=0, /* which tab to select by default */&lt;br /&gt;
  DOM_ul, /* tabbernav list */&lt;br /&gt;
  DOM_li, /* tabbernav list item */&lt;br /&gt;
  DOM_a, /* tabbernav link */&lt;br /&gt;
  aId, /* A unique id for DOM_a */&lt;br /&gt;
  headingElement; /* searching for text to use in the tab */&lt;br /&gt;
 &lt;br /&gt;
  /* Verify that the browser supports DOM scripting */&lt;br /&gt;
  if (!document.getElementsByTagName) { return false; }&lt;br /&gt;
 &lt;br /&gt;
  /* If the main DIV has an ID then save it. */&lt;br /&gt;
  if (e.id) {&lt;br /&gt;
    this.id = e.id;&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  /* Clear the tabs array (but it should normally be empty) */&lt;br /&gt;
  this.tabs.length = 0;&lt;br /&gt;
 &lt;br /&gt;
  /* Loop through an array of all the child nodes within our tabber element. */&lt;br /&gt;
  childNodes = e.childNodes;&lt;br /&gt;
  for(i=0; i &amp;lt; childNodes.length; i++) {&lt;br /&gt;
 &lt;br /&gt;
    /* Find the nodes where class=&amp;quot;tabbertab&amp;quot; */&lt;br /&gt;
    if(childNodes[i].className &amp;amp;&amp;amp;&lt;br /&gt;
       childNodes[i].className.match(this.REclassTab)) {&lt;br /&gt;
      &lt;br /&gt;
      /* Create a new object to save info about this tab */&lt;br /&gt;
      t = new Object();&lt;br /&gt;
      &lt;br /&gt;
      /* Save a pointer to the div for this tab */&lt;br /&gt;
      t.div = childNodes[i];&lt;br /&gt;
      &lt;br /&gt;
      /* Add the new object to the array of tabs */&lt;br /&gt;
      this.tabs[this.tabs.length] = t;&lt;br /&gt;
 &lt;br /&gt;
      /* If the class name contains classTabDefault,&lt;br /&gt;
    then select this tab by default.&lt;br /&gt;
      */&lt;br /&gt;
      if (childNodes[i].className.match(this.REclassTabDefault)) {&lt;br /&gt;
   defaultTab = this.tabs.length-1;&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  /* Create a new UL list to hold the tab headings */&lt;br /&gt;
  DOM_ul = document.createElement(&amp;quot;ul&amp;quot;);&lt;br /&gt;
  DOM_ul.className = this.classNav;&lt;br /&gt;
  &lt;br /&gt;
  /* Loop through each tab we found */&lt;br /&gt;
  for (i=0; i &amp;lt; this.tabs.length; i++) {&lt;br /&gt;
 &lt;br /&gt;
    t = this.tabs[i];&lt;br /&gt;
 &lt;br /&gt;
    /* Get the label to use for this tab:&lt;br /&gt;
       From the title attribute on the DIV,&lt;br /&gt;
       Or from one of the this.titleElements[] elements,&lt;br /&gt;
       Or use an automatically generated number.&lt;br /&gt;
     */&lt;br /&gt;
    t.headingText = t.div.title;&lt;br /&gt;
 &lt;br /&gt;
    /* Remove the title attribute to prevent a tooltip from appearing */&lt;br /&gt;
    if (this.removeTitle) { t.div.title = &amp;#039;&amp;#039;; }&lt;br /&gt;
 &lt;br /&gt;
    if (!t.headingText) {&lt;br /&gt;
 &lt;br /&gt;
      /* Title was not defined in the title of the DIV,&lt;br /&gt;
    So try to get the title from an element within the DIV.&lt;br /&gt;
    Go through the list of elements in this.titleElements&lt;br /&gt;
    (typically heading elements [&amp;#039;h2&amp;#039;,&amp;#039;h3&amp;#039;,&amp;#039;h4&amp;#039;])&lt;br /&gt;
      */&lt;br /&gt;
      for (i2=0; i2&amp;lt;this.titleElements.length; i2++) {&lt;br /&gt;
   headingElement = t.div.getElementsByTagName(this.titleElements[i2])[0];&lt;br /&gt;
   if (headingElement) {&lt;br /&gt;
     t.headingText = headingElement.innerHTML;&lt;br /&gt;
     if (this.titleElementsStripHTML) {&lt;br /&gt;
       t.headingText.replace(/&amp;lt;br&amp;gt;/gi,&amp;quot; &amp;quot;);&lt;br /&gt;
       t.headingText = t.headingText.replace(/&amp;lt;[^&amp;gt;]+&amp;gt;/g,&amp;quot;&amp;quot;);&lt;br /&gt;
     }&lt;br /&gt;
     break;&lt;br /&gt;
   }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    if (!t.headingText) {&lt;br /&gt;
      /* Title was not found (or is blank) so automatically generate a&lt;br /&gt;
         number for the tab.&lt;br /&gt;
      */&lt;br /&gt;
      t.headingText = i + 1;&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    /* Create a list element for the tab */&lt;br /&gt;
    DOM_li = document.createElement(&amp;quot;li&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    /* Save a reference to this list item so we can later change it to&lt;br /&gt;
       the &amp;quot;active&amp;quot; class */&lt;br /&gt;
    t.li = DOM_li;&lt;br /&gt;
 &lt;br /&gt;
    /* Create a link to activate the tab */&lt;br /&gt;
    DOM_a = document.createElement(&amp;quot;a&amp;quot;);&lt;br /&gt;
    DOM_a.appendChild(document.createTextNode(t.headingText));&lt;br /&gt;
    DOM_a.href = &amp;quot;javascript:void(null);&amp;quot;;&lt;br /&gt;
    DOM_a.title = t.headingText;&lt;br /&gt;
    DOM_a.onclick = this.navClick;&lt;br /&gt;
 &lt;br /&gt;
    /* Add some properties to the link so we can identify which tab&lt;br /&gt;
       was clicked. Later the navClick method will need this.&lt;br /&gt;
    */&lt;br /&gt;
    DOM_a.tabber = this;&lt;br /&gt;
    DOM_a.tabberIndex = i;&lt;br /&gt;
 &lt;br /&gt;
    /* Do we need to add an id to DOM_a? */&lt;br /&gt;
    if (this.addLinkId &amp;amp;&amp;amp; this.linkIdFormat) {&lt;br /&gt;
 &lt;br /&gt;
      /* Determine the id name */&lt;br /&gt;
      aId = this.linkIdFormat;&lt;br /&gt;
      aId = aId.replace(/&amp;lt;tabberid&amp;gt;/gi, this.id);&lt;br /&gt;
      aId = aId.replace(/&amp;lt;tabnumberzero&amp;gt;/gi, i);&lt;br /&gt;
      aId = aId.replace(/&amp;lt;tabnumberone&amp;gt;/gi, i+1);&lt;br /&gt;
      aId = aId.replace(/&amp;lt;tabtitle&amp;gt;/gi, t.headingText.replace(/[^a-zA-Z0-9\-]/gi, &amp;#039;&amp;#039;));&lt;br /&gt;
 &lt;br /&gt;
      DOM_a.id = aId;&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    /* Add the link to the list element */&lt;br /&gt;
    DOM_li.appendChild(DOM_a);&lt;br /&gt;
 &lt;br /&gt;
    /* Add the list element to the list */&lt;br /&gt;
    DOM_ul.appendChild(DOM_li);&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  /* Add the UL list to the beginning of the tabber div */&lt;br /&gt;
  e.insertBefore(DOM_ul, e.firstChild);&lt;br /&gt;
 &lt;br /&gt;
  /* Make the tabber div &amp;quot;live&amp;quot; so different CSS can be applied */&lt;br /&gt;
  e.className = e.className.replace(this.REclassMain, this.classMainLive);&lt;br /&gt;
 &lt;br /&gt;
  /* Activate the default tab, and do not call the onclick handler */&lt;br /&gt;
  this.tabShow(defaultTab);&lt;br /&gt;
 &lt;br /&gt;
  /* If the user specified an onLoad function, call it now. */&lt;br /&gt;
  if (typeof this.onLoad == &amp;#039;function&amp;#039;) {&lt;br /&gt;
    this.onLoad({tabber:this});&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  return this;&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
tabberObj.prototype.navClick = function(event)&lt;br /&gt;
{&lt;br /&gt;
  /* This method should only be called by the onClick event of an &amp;lt;A&amp;gt;&lt;br /&gt;
     element, in which case we will determine which tab was clicked by&lt;br /&gt;
     examining a property that we previously attached to the &amp;lt;A&amp;gt;&lt;br /&gt;
     element.&lt;br /&gt;
 &lt;br /&gt;
     Since this was triggered from an onClick event, the variable&lt;br /&gt;
     &amp;quot;this&amp;quot; refers to the &amp;lt;A&amp;gt; element that triggered the onClick&lt;br /&gt;
     event (and not to the tabberObj).&lt;br /&gt;
 &lt;br /&gt;
     When tabberObj was initialized, we added some extra properties&lt;br /&gt;
     to the &amp;lt;A&amp;gt; element, for the purpose of retrieving them now. Get&lt;br /&gt;
     the tabberObj object, plus the tab number that was clicked.&lt;br /&gt;
  */&lt;br /&gt;
 &lt;br /&gt;
  var&lt;br /&gt;
  rVal, /* Return value from the user onclick function */&lt;br /&gt;
  a, /* element that triggered the onclick event */&lt;br /&gt;
  self, /* the tabber object */&lt;br /&gt;
  tabberIndex, /* index of the tab that triggered the event */&lt;br /&gt;
  onClickArgs; /* args to send the onclick function */&lt;br /&gt;
 &lt;br /&gt;
  a = this;&lt;br /&gt;
  if (!a.tabber) { return false; }&lt;br /&gt;
 &lt;br /&gt;
  self = a.tabber;&lt;br /&gt;
  tabberIndex = a.tabberIndex;&lt;br /&gt;
 &lt;br /&gt;
  /* Remove focus from the link because it looks ugly.&lt;br /&gt;
     I don&amp;#039;t know if this is a good idea...&lt;br /&gt;
  */&lt;br /&gt;
  a.blur();&lt;br /&gt;
 &lt;br /&gt;
  /* If the user specified an onClick function, call it now.&lt;br /&gt;
     If the function returns false then do not continue.&lt;br /&gt;
  */&lt;br /&gt;
  if (typeof self.onClick == &amp;#039;function&amp;#039;) {&lt;br /&gt;
 &lt;br /&gt;
    onClickArgs = {&amp;#039;tabber&amp;#039;:self, &amp;#039;index&amp;#039;:tabberIndex, &amp;#039;event&amp;#039;:event};&lt;br /&gt;
 &lt;br /&gt;
    /* IE uses a different way to access the event object */&lt;br /&gt;
    if (!event) { onClickArgs.event = window.event; }&lt;br /&gt;
 &lt;br /&gt;
    rVal = self.onClick(onClickArgs);&lt;br /&gt;
    if (rVal === false) { return false; }&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  self.tabShow(tabberIndex);&lt;br /&gt;
 &lt;br /&gt;
  return false;&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
tabberObj.prototype.tabHideAll = function()&lt;br /&gt;
{&lt;br /&gt;
  var i; /* counter */&lt;br /&gt;
 &lt;br /&gt;
  /* Hide all tabs and make all navigation links inactive */&lt;br /&gt;
  for (i = 0; i &amp;lt; this.tabs.length; i++) {&lt;br /&gt;
    this.tabHide(i);&lt;br /&gt;
  }&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
tabberObj.prototype.tabHide = function(tabberIndex)&lt;br /&gt;
{&lt;br /&gt;
  var div;&lt;br /&gt;
 &lt;br /&gt;
  if (!this.tabs[tabberIndex]) { return false; }&lt;br /&gt;
 &lt;br /&gt;
  /* Hide a single tab and make its navigation link inactive */&lt;br /&gt;
  div = this.tabs[tabberIndex].div;&lt;br /&gt;
 &lt;br /&gt;
  /* Hide the tab contents by adding classTabHide to the div */&lt;br /&gt;
  if (!div.className.match(this.REclassTabHide)) {&lt;br /&gt;
    div.className += &amp;#039; &amp;#039; + this.classTabHide;&lt;br /&gt;
  }&lt;br /&gt;
  this.navClearActive(tabberIndex);&lt;br /&gt;
 &lt;br /&gt;
  return this;&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
tabberObj.prototype.tabShow = function(tabberIndex)&lt;br /&gt;
{&lt;br /&gt;
  /* Show the tabberIndex tab and hide all the other tabs */&lt;br /&gt;
 &lt;br /&gt;
  var div;&lt;br /&gt;
 &lt;br /&gt;
  if (!this.tabs[tabberIndex]) { return false; }&lt;br /&gt;
 &lt;br /&gt;
  /* Hide all the tabs first */&lt;br /&gt;
  this.tabHideAll();&lt;br /&gt;
 &lt;br /&gt;
  /* Get the div that holds this tab */&lt;br /&gt;
  div = this.tabs[tabberIndex].div;&lt;br /&gt;
 &lt;br /&gt;
  /* Remove classTabHide from the div */&lt;br /&gt;
  div.className = div.className.replace(this.REclassTabHide, &amp;#039;&amp;#039;);&lt;br /&gt;
 &lt;br /&gt;
  /* Mark this tab navigation link as &amp;quot;active&amp;quot; */&lt;br /&gt;
  this.navSetActive(tabberIndex);&lt;br /&gt;
 &lt;br /&gt;
  /* If the user specified an onTabDisplay function, call it now. */&lt;br /&gt;
  if (typeof this.onTabDisplay == &amp;#039;function&amp;#039;) {&lt;br /&gt;
    this.onTabDisplay({&amp;#039;tabber&amp;#039;:this, &amp;#039;index&amp;#039;:tabberIndex});&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
  return this;&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
tabberObj.prototype.navSetActive = function(tabberIndex)&lt;br /&gt;
{&lt;br /&gt;
  /* Note: this method does *not* enforce the rule&lt;br /&gt;
     that only one nav item can be active at a time.&lt;br /&gt;
  */&lt;br /&gt;
 &lt;br /&gt;
  /* Set classNavActive for the navigation list item */&lt;br /&gt;
  this.tabs[tabberIndex].li.className = this.classNavActive;&lt;br /&gt;
 &lt;br /&gt;
  return this;&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
tabberObj.prototype.navClearActive = function(tabberIndex)&lt;br /&gt;
{&lt;br /&gt;
  /* Note: this method does *not* enforce the rule&lt;br /&gt;
     that one nav should always be active.&lt;br /&gt;
  */&lt;br /&gt;
 &lt;br /&gt;
  /* Remove classNavActive from the navigation list item */&lt;br /&gt;
  this.tabs[tabberIndex].li.className = &amp;#039;&amp;#039;;&lt;br /&gt;
 &lt;br /&gt;
  return this;&lt;br /&gt;
};&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/*==================================================*/&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
function tabberAutomatic(tabberArgs)&lt;br /&gt;
{&lt;br /&gt;
  /* This function finds all DIV elements in the document where&lt;br /&gt;
     class=tabber.classMain, then converts them to use the tabber&lt;br /&gt;
     interface.&lt;br /&gt;
 &lt;br /&gt;
     tabberArgs = an object to send to &amp;quot;new tabber()&amp;quot;&lt;br /&gt;
  */&lt;br /&gt;
  var&lt;br /&gt;
    tempObj, /* Temporary tabber object */&lt;br /&gt;
    divs, /* Array of all divs on the page */&lt;br /&gt;
    i; /* Loop index */&lt;br /&gt;
 &lt;br /&gt;
  if (!tabberArgs) { tabberArgs = {}; }&lt;br /&gt;
 &lt;br /&gt;
  /* Create a tabber object so we can get the value of classMain */&lt;br /&gt;
  tempObj = new tabberObj(tabberArgs);&lt;br /&gt;
 &lt;br /&gt;
  /* Find all DIV elements in the document that have class=tabber */&lt;br /&gt;
 &lt;br /&gt;
  /* First get an array of all DIV elements and loop through them */&lt;br /&gt;
  divs = document.getElementsByTagName(&amp;quot;div&amp;quot;);&lt;br /&gt;
  for (i=0; i &amp;lt; divs.length; i++) {&lt;br /&gt;
    &lt;br /&gt;
    /* Is this DIV the correct class? */&lt;br /&gt;
    if (divs[i].className &amp;amp;&amp;amp;&lt;br /&gt;
   divs[i].className.match(tempObj.REclassMain)) {&lt;br /&gt;
      &lt;br /&gt;
      /* Now tabify the DIV */&lt;br /&gt;
      tabberArgs.div = divs[i];&lt;br /&gt;
      divs[i].tabber = new tabberObj(tabberArgs);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  return this;&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/*==================================================*/&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
function tabberAutomaticOnLoad(tabberArgs)&lt;br /&gt;
{&lt;br /&gt;
  /* This function adds tabberAutomatic to the window.onload event,&lt;br /&gt;
     so it will run after the document has finished loading.&lt;br /&gt;
  */&lt;br /&gt;
  var oldOnLoad;&lt;br /&gt;
 &lt;br /&gt;
  if (!tabberArgs) { tabberArgs = {}; }&lt;br /&gt;
 &lt;br /&gt;
  /* Taken from: http://simon.incutio.com/archive/2004/05/26/addLoadEvent */&lt;br /&gt;
 &lt;br /&gt;
  oldOnLoad = window.onload;&lt;br /&gt;
  if (typeof window.onload != &amp;#039;function&amp;#039;) {&lt;br /&gt;
    window.onload = function() {&lt;br /&gt;
      tabberAutomatic(tabberArgs);&lt;br /&gt;
    };&lt;br /&gt;
  } else {&lt;br /&gt;
    window.onload = function() {&lt;br /&gt;
      oldOnLoad();&lt;br /&gt;
      tabberAutomatic(tabberArgs);&lt;br /&gt;
    };&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/*==================================================*/&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
/* Run tabberAutomaticOnload() unless the &amp;quot;manualStartup&amp;quot; option was specified */&lt;br /&gt;
 &lt;br /&gt;
if (typeof tabberOptions == &amp;#039;undefined&amp;#039;) {&lt;br /&gt;
 &lt;br /&gt;
    tabberAutomaticOnLoad();&lt;br /&gt;
 &lt;br /&gt;
} else {&lt;br /&gt;
 &lt;br /&gt;
  if (!tabberOptions[&amp;#039;manualStartup&amp;#039;]) {&lt;br /&gt;
    tabberAutomaticOnLoad(tabberOptions);&lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* Username inserts for the Player template; source: KHWiki.com */&lt;br /&gt;
function UserNameReplace() {&lt;br /&gt;
	if (typeof(disableUsernameReplace) != &amp;#039;undefined&amp;#039; &amp;amp;&amp;amp; disableUsernameReplace || mw.config.get(&amp;#039;wgUserName&amp;#039;) == null) return;&lt;br /&gt;
	$(&amp;#039;span.insertusername&amp;#039;).each(function () {&lt;br /&gt;
		$(this).text(mw.config.get(&amp;#039;wgUserName&amp;#039;));&lt;br /&gt;
	});&lt;br /&gt;
}&lt;br /&gt;
$(UserNameReplace);&lt;/div&gt;</summary>
		<author><name>TheSilentHero</name></author>
	</entry>
</feed>