<?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%3ACommon.js</id>
	<title>MediaWiki:Common.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%3ACommon.js"/>
	<link rel="alternate" type="text/html" href="https://www.khuxwiki.com/w/index.php?title=MediaWiki:Common.js&amp;action=history"/>
	<updated>2026-05-06T12:43:34Z</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:Common.js&amp;diff=104576&amp;oldid=prev</id>
		<title>TheSilentHero at 09:26, 3 August 2024</title>
		<link rel="alternate" type="text/html" href="https://www.khuxwiki.com/w/index.php?title=MediaWiki:Common.js&amp;diff=104576&amp;oldid=prev"/>
		<updated>2024-08-03T09:26:10Z</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 all users on every page load. */&lt;br /&gt;
&lt;br /&gt;
/* Statcounter code for YOUR WIKI SITE */&lt;br /&gt;
var sc_project=10905682;&lt;br /&gt;
var sc_invisible=1;&lt;br /&gt;
var sc_security=&amp;quot;1d510d1c&amp;quot;;&lt;br /&gt;
var script = document.createElement(&amp;#039;script&amp;#039;);&lt;br /&gt;
script.src = &amp;quot;https://secure.statcounter.com/counter/counter.js&amp;quot;&lt;br /&gt;
document.body.appendChild(script)&lt;br /&gt;
/* End of Statcounter Code */&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
 * Collapsible tables&lt;br /&gt;
 *&lt;br /&gt;
 * Allows tables to be collapsed, showing only the header. See [[Help:Collapsing]].&lt;br /&gt;
 *&lt;br /&gt;
 * @version 2.0.3 (2014-03-14)&lt;br /&gt;
 * @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-collapsibleTables.js&lt;br /&gt;
 * @author [[User:R. Koot]]&lt;br /&gt;
 * @author [[User:Krinkle]]&lt;br /&gt;
 * @deprecated Since MediaWiki 1.20: Use class=&amp;quot;mw-collapsible&amp;quot; instead which&lt;br /&gt;
 * is supported in MediaWiki core.&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
var autoCollapse = 2;&lt;br /&gt;
var collapseCaption = &amp;#039;hide&amp;#039;;&lt;br /&gt;
var expandCaption = &amp;#039;show&amp;#039;;&lt;br /&gt;
var tableIndex = 0;&lt;br /&gt;
&lt;br /&gt;
function collapseTable( tableIndex ) {&lt;br /&gt;
    var Button = document.getElementById( &amp;#039;collapseButton&amp;#039; + tableIndex );&lt;br /&gt;
    var Table = document.getElementById( &amp;#039;collapsibleTable&amp;#039; + tableIndex );&lt;br /&gt;
&lt;br /&gt;
    if ( !Table || !Button ) {&lt;br /&gt;
        return false;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    var Rows = Table.rows;&lt;br /&gt;
    var i;&lt;br /&gt;
    var $row0 = $(Rows[0]);&lt;br /&gt;
&lt;br /&gt;
    if ( Button.firstChild.data === collapseCaption ) {&lt;br /&gt;
        for ( i = 1; i &amp;lt; Rows.length; i++ ) {&lt;br /&gt;
            Rows[i].style.display = &amp;#039;none&amp;#039;;&lt;br /&gt;
        }&lt;br /&gt;
        Button.firstChild.data = expandCaption;&lt;br /&gt;
    } else {&lt;br /&gt;
        for ( i = 1; i &amp;lt; Rows.length; i++ ) {&lt;br /&gt;
            Rows[i].style.display = $row0.css( &amp;#039;display&amp;#039; );&lt;br /&gt;
        }&lt;br /&gt;
        Button.firstChild.data = collapseCaption;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function createClickHandler( tableIndex ) {&lt;br /&gt;
    return function ( e ) {&lt;br /&gt;
        e.preventDefault();&lt;br /&gt;
        collapseTable( tableIndex );&lt;br /&gt;
    };&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function createCollapseButtons( $content ) {&lt;br /&gt;
    var NavigationBoxes = {};&lt;br /&gt;
    var $Tables = $content.find( &amp;#039;table&amp;#039; );&lt;br /&gt;
    var i;&lt;br /&gt;
&lt;br /&gt;
    $Tables.each( function( i, table ) {&lt;br /&gt;
        if ( $(table).hasClass( &amp;#039;collapsible&amp;#039; ) ) {&lt;br /&gt;
&lt;br /&gt;
            /* only add button and increment count if there is a header row to work with */&lt;br /&gt;
            var HeaderRow = table.getElementsByTagName( &amp;#039;tr&amp;#039; )[0];&lt;br /&gt;
            if ( !HeaderRow ) {&lt;br /&gt;
                return;&lt;br /&gt;
            }&lt;br /&gt;
            var Header = table.getElementsByTagName( &amp;#039;th&amp;#039; )[0];&lt;br /&gt;
            if ( !Header ) {&lt;br /&gt;
                return;&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            NavigationBoxes[ tableIndex ] = table;&lt;br /&gt;
            table.setAttribute( &amp;#039;id&amp;#039;, &amp;#039;collapsibleTable&amp;#039; + tableIndex );&lt;br /&gt;
&lt;br /&gt;
            var Button     = document.createElement( &amp;#039;span&amp;#039; );&lt;br /&gt;
            var ButtonLink = document.createElement( &amp;#039;a&amp;#039; );&lt;br /&gt;
            var ButtonText = document.createTextNode( collapseCaption );&lt;br /&gt;
            // Styles are declared in [[MediaWiki:Common.css]]&lt;br /&gt;
            Button.className = &amp;#039;collapseButton&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
            ButtonLink.style.color = Header.style.color;&lt;br /&gt;
            ButtonLink.setAttribute( &amp;#039;id&amp;#039;, &amp;#039;collapseButton&amp;#039; + tableIndex );&lt;br /&gt;
            ButtonLink.setAttribute( &amp;#039;href&amp;#039;, &amp;#039;#&amp;#039; );&lt;br /&gt;
            $( ButtonLink ).on( &amp;#039;click&amp;#039;, createClickHandler( tableIndex ) );&lt;br /&gt;
            ButtonLink.appendChild( ButtonText );&lt;br /&gt;
&lt;br /&gt;
            Button.appendChild( document.createTextNode( &amp;#039;[&amp;#039; ) );&lt;br /&gt;
            Button.appendChild( ButtonLink );&lt;br /&gt;
            Button.appendChild( document.createTextNode( &amp;#039;]&amp;#039; ) );&lt;br /&gt;
&lt;br /&gt;
            Header.insertBefore( Button, Header.firstChild );&lt;br /&gt;
            tableIndex++;&lt;br /&gt;
        }&lt;br /&gt;
    } );&lt;br /&gt;
&lt;br /&gt;
    for ( i = 0;  i &amp;lt; tableIndex; i++ ) {&lt;br /&gt;
        if ( $( NavigationBoxes[i] ).hasClass( &amp;#039;collapsed&amp;#039; ) ||&lt;br /&gt;
            ( tableIndex &amp;gt;= autoCollapse &amp;amp;&amp;amp; $( NavigationBoxes[i] ).hasClass( &amp;#039;autocollapse&amp;#039; ) )&lt;br /&gt;
        ) {&lt;br /&gt;
            collapseTable( i );&lt;br /&gt;
        }&lt;br /&gt;
        else if ( $( NavigationBoxes[i] ).hasClass ( &amp;#039;innercollapse&amp;#039; ) ) {&lt;br /&gt;
            var element = NavigationBoxes[i];&lt;br /&gt;
            while ((element = element.parentNode)) {&lt;br /&gt;
                if ( $( element ).hasClass( &amp;#039;outercollapse&amp;#039; ) ) {&lt;br /&gt;
                    collapseTable ( i );&lt;br /&gt;
                    break;&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
mw.hook( &amp;#039;wikipage.content&amp;#039; ).add( createCollapseButtons );&lt;br /&gt;
&lt;br /&gt;
// Code courtesy of pcj of WoWWiki.&lt;br /&gt;
// This is a modified version of the WoWWiki site version.&lt;br /&gt;
&lt;br /&gt;
// Code adds a checkbox at the top of the Special:RecentChanges list, next to the header.&lt;br /&gt;
// Ticking it sets a cookie (should be individual to wikis) and starts updating the RC list.&lt;br /&gt;
// This occurs silently every 30 seconds without a full page reload occuring.&lt;br /&gt;
&lt;br /&gt;
function setCookie(c_name, value, expiredays) {&lt;br /&gt;
	var exdate = new Date();&lt;br /&gt;
	exdate.setDate(exdate.getDate() + expiredays);&lt;br /&gt;
	document.cookie = c_name + &amp;quot;=&amp;quot; + escape(value) + ((expiredays == null) ? &amp;quot;&amp;quot; : &amp;quot;;expires=&amp;quot; + exdate.toGMTString());&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function getCookie(c_name) {&lt;br /&gt;
	if (document.cookie.length &amp;gt; 0) {&lt;br /&gt;
		c_start = document.cookie.indexOf(c_name + &amp;quot;=&amp;quot;);&lt;br /&gt;
		if (c_start != -1) {&lt;br /&gt;
			c_start = c_start + c_name.length + 1;&lt;br /&gt;
			c_end = document.cookie.indexOf(&amp;quot;;&amp;quot;, c_start);&lt;br /&gt;
			if (c_end == -1) c_end = document.cookie.length;&lt;br /&gt;
			return unescape(document.cookie.substring(c_start, c_end));&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	return &amp;quot;&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
var ajaxPages = new Array(&amp;quot;Special:RecentChanges&amp;quot;);&lt;br /&gt;
var ajaxRCOverride = false;&lt;br /&gt;
var rcRefresh = 30000;&lt;br /&gt;
&lt;br /&gt;
function ajaxRC() {&lt;br /&gt;
	appTo = $(&amp;quot;.firstHeading&amp;quot;);&lt;br /&gt;
	appTo.append(&amp;#039;&amp;amp;nbsp;&amp;lt;span style=&amp;quot;position:absolute; margin-left:10px;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-size: xx-small; cursor:help;&amp;quot; title=&amp;quot;Automatically refresh the current page every &amp;#039; + Math.floor(rcRefresh / 1000) + &amp;#039; seconds&amp;quot;&amp;gt;AUTO-REFRESH:&amp;lt;/span&amp;gt;&amp;lt;input type=&amp;quot;checkbox&amp;quot; id=&amp;quot;autoRefreshToggle&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;position:relative; top:5px; left:5px;&amp;quot; id=&amp;quot;autoRefreshProgress&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;/w/images/loader.gif&amp;quot; border=&amp;quot;0&amp;quot; alt=&amp;quot;AJAX operation in progress&amp;quot; /&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt;&amp;#039;);&lt;br /&gt;
	$(&amp;quot;#autoRefreshToggle&amp;quot;).click(function () {&lt;br /&gt;
		setCookie(&amp;quot;ajaxRC&amp;quot;, $(&amp;quot;#autoRefreshToggle&amp;quot;).is(&amp;quot;:checked&amp;quot;) ? &amp;quot;on&amp;quot; : &amp;quot;off&amp;quot;)&lt;br /&gt;
		loadRCData()&lt;br /&gt;
	});&lt;br /&gt;
	$(&amp;quot;#autoRefreshProgress&amp;quot;).hide();&lt;br /&gt;
	if (getCookie(&amp;quot;ajaxRC&amp;quot;) == &amp;quot;on&amp;quot; || ajaxRCOverride) {&lt;br /&gt;
		$(&amp;quot;#autoRefreshToggle&amp;quot;).attr(&amp;quot;checked&amp;quot;, &amp;quot;checked&amp;quot;);&lt;br /&gt;
		setTimeout(&amp;quot;loadRCData();&amp;quot;, rcRefresh);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function loadRCData() {&lt;br /&gt;
	if (!$(&amp;quot;#autoRefreshToggle&amp;quot;).is(&amp;quot;:checked&amp;quot;)) return;&lt;br /&gt;
	$(&amp;#039;#autoRefreshProgress&amp;#039;).show()&lt;br /&gt;
	$(article).load(location.href + &amp;quot; &amp;quot; + article + &amp;quot; &amp;gt; *&amp;quot;, function (data) {&lt;br /&gt;
		$(article + &amp;quot; .mw-collapsible&amp;quot;).makeCollapsible();&lt;br /&gt;
		$(&amp;#039;#autoRefreshProgress&amp;#039;).hide()&lt;br /&gt;
		if ($(&amp;quot;#autoRefreshToggle&amp;quot;).is(&amp;quot;:checked&amp;quot;)) setTimeout(&amp;quot;loadRCData();&amp;quot;, rcRefresh);&lt;br /&gt;
	});&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$(function () {&lt;br /&gt;
	article = &amp;quot;#bodyContent&amp;quot;;&lt;br /&gt;
	for (x in ajaxPages) {&lt;br /&gt;
		if (wgPageName == ajaxPages[x] &amp;amp;&amp;amp; $(&amp;quot;#autoRefreshToggle&amp;quot;).length == 0) ajaxRC();&lt;br /&gt;
	}&lt;br /&gt;
});&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;
/**&lt;br /&gt;
 * Countdown&lt;br /&gt;
 *&lt;br /&gt;
 * Version: 2.0&lt;br /&gt;
 *&lt;br /&gt;
 * Rewrite by Pecoes&lt;br /&gt;
 * Original script by Splarka + Eladkse&lt;br /&gt;
 *&lt;br /&gt;
 * documentation and examples at:&lt;br /&gt;
 * http://dev.wikia.com/wiki/Countdown&lt;br /&gt;
 * (some things like languages options removed)&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
;(function (module, mw, $) {&lt;br /&gt;
    &lt;br /&gt;
    &amp;#039;use strict&amp;#039;;&lt;br /&gt;
    &lt;br /&gt;
    var translations = $.extend(true, {&lt;br /&gt;
        en: {&lt;br /&gt;
            and: &amp;#039;and&amp;#039;,&lt;br /&gt;
            second: &amp;#039;second&amp;#039;,&lt;br /&gt;
            seconds: &amp;#039;seconds&amp;#039;,&lt;br /&gt;
            minute: &amp;#039;minute&amp;#039;,&lt;br /&gt;
            minutes: &amp;#039;minutes&amp;#039;,&lt;br /&gt;
            hour: &amp;#039;hour&amp;#039;,&lt;br /&gt;
            hours: &amp;#039;hours&amp;#039;,&lt;br /&gt;
            day: &amp;#039;day&amp;#039;,&lt;br /&gt;
            days: &amp;#039;days&amp;#039;&lt;br /&gt;
        }&lt;br /&gt;
    }, module.translations || {}),&lt;br /&gt;
    i18n = translations[&lt;br /&gt;
        mw.config.get(&amp;#039;wgContentLanguage&amp;#039;)&lt;br /&gt;
    ] || translations.en;&lt;br /&gt;
&lt;br /&gt;
    var countdowns = [];&lt;br /&gt;
    &lt;br /&gt;
    var NO_LEADING_ZEROS = 1;&lt;br /&gt;
    &lt;br /&gt;
    function output (i, diff) {&lt;br /&gt;
        /*jshint bitwise:false*/&lt;br /&gt;
        var delta, result, parts = [];&lt;br /&gt;
        delta = diff % 60;&lt;br /&gt;
        parts.unshift(delta + &amp;#039; &amp;#039; + i18n[delta === 1 ? &amp;#039;second&amp;#039; : &amp;#039;seconds&amp;#039;]);&lt;br /&gt;
        diff = Math.floor(diff / 60);&lt;br /&gt;
        delta = diff % 60;&lt;br /&gt;
        parts.unshift(delta + &amp;#039; &amp;#039; + i18n[delta === 1 ? &amp;#039;minute&amp;#039; : &amp;#039;minutes&amp;#039;]);&lt;br /&gt;
        diff = Math.floor(diff / 60);&lt;br /&gt;
        delta = diff % 24;&lt;br /&gt;
        parts.unshift(delta + &amp;#039; &amp;#039; + i18n[delta === 1 ? &amp;#039;hour&amp;#039;   : &amp;#039;hours&amp;#039;  ]);&lt;br /&gt;
        diff = Math.floor(diff / 24);&lt;br /&gt;
        parts.unshift(diff  + &amp;#039; &amp;#039; + i18n[diff  === 1 ? &amp;#039;day&amp;#039;    : &amp;#039;days&amp;#039;   ]);&lt;br /&gt;
        result = parts.pop();&lt;br /&gt;
        if (countdowns[i].opts &amp;amp; NO_LEADING_ZEROS) {&lt;br /&gt;
            while (parts.length &amp;amp;&amp;amp; parts[0][0] === &amp;#039;0&amp;#039;) {&lt;br /&gt;
                parts.shift();&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        if (parts.length) {&lt;br /&gt;
            result = parts.join(&amp;#039;, &amp;#039;) + &amp;#039; &amp;#039; + i18n.and + &amp;#039; &amp;#039; + result;&lt;br /&gt;
        }&lt;br /&gt;
        countdowns[i].node.text(result);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    function end(i) {&lt;br /&gt;
        var c = countdowns[i].node.parent();&lt;br /&gt;
        switch (c.attr(&amp;#039;data-end&amp;#039;)) {&lt;br /&gt;
            case &amp;#039;remove&amp;#039;:&lt;br /&gt;
                c.remove();&lt;br /&gt;
                countdowns.splice(i, 1);&lt;br /&gt;
                return;&lt;br /&gt;
            case &amp;#039;stop&amp;#039;:&lt;br /&gt;
                output(i, 0);&lt;br /&gt;
                countdowns.splice(i, 1);&lt;br /&gt;
                return;&lt;br /&gt;
            case &amp;#039;toggle&amp;#039;:&lt;br /&gt;
                var toggle = c.attr(&amp;#039;data-toggle&amp;#039;);&lt;br /&gt;
                if (toggle &amp;amp;&amp;amp; $(toggle).length) {&lt;br /&gt;
                    $(toggle).css(&amp;#039;display&amp;#039;, &amp;#039;inline&amp;#039;);&lt;br /&gt;
                    c.css(&amp;#039;display&amp;#039;, &amp;#039;none&amp;#039;);&lt;br /&gt;
                    countdowns.splice(i, 1);&lt;br /&gt;
                    return;&lt;br /&gt;
                }&lt;br /&gt;
                break;&lt;br /&gt;
            case &amp;#039;callback&amp;#039;:&lt;br /&gt;
                var callback = c.attr(&amp;#039;data-callback&amp;#039;);&lt;br /&gt;
                if (callback &amp;amp;&amp;amp; $.isFunction(module[callback])) {&lt;br /&gt;
                    output(i, 0);&lt;br /&gt;
                    countdowns.splice(i, 1);&lt;br /&gt;
                    module[callback].call(c);&lt;br /&gt;
                    return;&lt;br /&gt;
                }&lt;br /&gt;
                break;&lt;br /&gt;
        }&lt;br /&gt;
        countdowns[i].countup = true;&lt;br /&gt;
        output(i, 0);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    function update () {&lt;br /&gt;
        var now = Date.now();&lt;br /&gt;
        $.each(countdowns.slice(0), function (i, countdown) {&lt;br /&gt;
            var diff = Math.floor((countdown.date - now) / 1000);&lt;br /&gt;
            if (diff &amp;lt;= 0 &amp;amp;&amp;amp; !countdown.countup) {&lt;br /&gt;
                end(i);&lt;br /&gt;
            } else {&lt;br /&gt;
                output(i, Math.abs(diff));&lt;br /&gt;
            }&lt;br /&gt;
        });&lt;br /&gt;
        if (countdowns.length) {&lt;br /&gt;
            window.setTimeout(function () {&lt;br /&gt;
                update();&lt;br /&gt;
            }, 1000);&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    function getOptions (node) {&lt;br /&gt;
        /*jshint bitwise:false*/&lt;br /&gt;
        var text = node.parent().attr(&amp;#039;data-options&amp;#039;),&lt;br /&gt;
            opts = 0;&lt;br /&gt;
        if (text) {&lt;br /&gt;
            if (/no-leading-zeros/.test(text)) {&lt;br /&gt;
                opts |= NO_LEADING_ZEROS;&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
        return opts;&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    $(function () {&lt;br /&gt;
        var countdown = $(&amp;#039;.countdown&amp;#039;);&lt;br /&gt;
        if (!countdown.length) return;&lt;br /&gt;
        $(&amp;#039;.nocountdown&amp;#039;).css(&amp;#039;display&amp;#039;, &amp;#039;none&amp;#039;);&lt;br /&gt;
        countdown&lt;br /&gt;
        .css(&amp;#039;display&amp;#039;, &amp;#039;inline&amp;#039;)&lt;br /&gt;
        .find(&amp;#039;.countdowndate&amp;#039;)&lt;br /&gt;
        .each(function () {&lt;br /&gt;
            var $this = $(this),&lt;br /&gt;
                date = (new Date($this.text())).valueOf();&lt;br /&gt;
            if (isNaN(date)) {&lt;br /&gt;
                $this.text(&amp;#039;BAD DATE&amp;#039;);&lt;br /&gt;
                return;&lt;br /&gt;
            }&lt;br /&gt;
            countdowns.push({&lt;br /&gt;
                node: $this,&lt;br /&gt;
                opts: getOptions($this),&lt;br /&gt;
                date: date,&lt;br /&gt;
            });&lt;br /&gt;
        });&lt;br /&gt;
        if (countdowns.length) {&lt;br /&gt;
            update();&lt;br /&gt;
        }&lt;br /&gt;
    });&lt;br /&gt;
    &lt;br /&gt;
}(window.countdownTimer = window.countdownTimer || {}, mediaWiki, jQuery));&lt;br /&gt;
&lt;br /&gt;
// **************************************************&lt;br /&gt;
//  - end -  JavaScript countdown timer&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>