Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.js: Difference between revisions

MediaWiki interface page
No edit summary
No edit summary
Line 5: Line 5:
var a = [
var a = [
["The Regalian Empire is rivalled only by the Songaskian Masaya in terms of power and authority.", "Regalia"],
["Ailor are the most populous Race in all of Aloria, and as a result, are often the most affluent as well.", "Ailor"],
["Ailor are the most populous race in all of Aloria, and are also the most affluent.", "Ailor"],
["The Sihai are the most distant Race, living beyond Aloria on the continent of Dexai in the Far East.", "Sihai"],
["Orcs are often considered the strongest, yet dumbest, race in Aloria. ", "Orc"],
["The Qadir are a Race with a past lost, destroyed by the Great Storm brought by the ancestors of the Songaskians. Now, all they have left is their clockwork, which many devote their lives to.", "Qadir"],
["TheAirships were designed to look like a mythical animal from Ellador, the Aetherwhale.", "Aetherwhale"],
["The Songaskia are the children of the Black Desert Dragon, and since they have emerged, they have dominated Farah’deen for over a century and a half.", "Songaskia"],
["Orcs created the world’s biggest firework, and the show was so awe-inspiring that it destroyed the Elven Empire.", "Elven Empire"],
["The Dwarves are a Race marred by tragedy, losing much of their population after they dug too deep under the earth, unleashing the relentless Dakkar that eventually destroyed all but two of their great Holds.", "Dwarf"],
["Despite their bear-like appearance, the Ur of Jorrhildr are active pacifists and dislike fighting.", "Ur"],
["Orcs are often considered the strongest, yet dumbest, Race in Aloria. ", "Orc"],
["Although the Nelfin are to thank for the advancements in Metallurgy, Dwarves will often feign that they were the true inventors of now mythical forges.", "Metallurgy"],
["Orcs are often stereotyped to all be green. In fact, there are several colorations to their skin tone that is based on what Tribe they come from.", "Orcs"],
["The Url are perhaps the most unique Race in Aloria, being a mutually-beneficial union between an exotic and alien Oorl Worm and a host body.", "Url"],
["Varran are one of the most diverse Races in Aloria, divided into countless subraces of mammalian life and live scattered across the whole of Daen.", "Varran"],
["Slizzar, despite being alien in their natural appearance, have the ability to transform into two different, Shifted, forms in order to appeal better to others.", "Slizzar"],
["Allar possess a remarkably firm caste system that has ruled their society for generations.", "Allar"],
["The Maraya are perhaps the oldest Race in Aloria, having survived the Void Cycle asleep within the earth only to awaken in the wake of the Cataclysm 300 years ago.", "Maraya"],
["Yanar are beings of living plant matter created by the goddess Estel in the final years before the Cataclysm in an attempt to warn the Altalar of their folly. They failed in this task, and are now spread about the world, each Yanar seeking their own path.", "Yanar"],
["All Altalar have the ability to acquire a Ring of Power, so long as they are pious and devoted enough to the Altalar Pantheon.", "Altalar"],
["The Avanthar are a Race of territorial horse-lords with the ability to imitate the traits of other Races through an ability called “Casting.”", "Avanthar"],
["Kathar were once just Void Worshipping Altalar, but they gave up their appearance and powers to fully gain access to the power of the Void for their own uses.", "Kathar"],
["The Isldar protected the last Violet Night Dragon on Ellador and when it was finally killed by Dwarves, the spell they enacted changed the world.", "Isldar"],
["The Cielothar are pacifistic animal-tenders, but have suffered much in recent years as the Regalian Empire has expanded into their territory.", "Cielothar"],
["Sihndar have many strange abilities and even stranger beliefs, likely due to their extreme isolation in the distant north of Aloria and because of their creation as a result of warping, corrupting Essences.", "Sihndar"],
["Half Races can be rather exotic beings, and even Races some think would be totally incompatible with each other actually are.", "Half Races"],
["Despite popular culture, Vampires don't have stronger immune systems than those uninfected with the dark disease.", "Vampires"],
["The Allorn Empire dominated Aloria for millennia with Magic and remarkable innovations. Unfortunately, much of this was lost to both the Wildering and the Cataclysm.", "Allorn Empire"],
["The Regalian Empire is rivalled only by the Songaskian Masaya in terms of power and authority.", "Songaskian Masaya"],
["The Kingdom of Nordskag is a wild place, with open expansions of wilderness and varied Velheim people living in it.", "Kingdom of Nordskag"],
["Magic is a very uncommon sight in Regalia, and most shun its existence and usage.", "Magic"],
["Magic is a very uncommon sight in Regalia, and most shun its existence and usage.", "Magic"],
["The Regalian Empire is home to a number of Knightly Orders, including the Viridian Order, the Turall Bladesmen, and the Helerian Guards.", "Military Schools"],
["The Regalian Empire is home to a number of Combat Schools that help to train all sorts of combatants, from knights to foot soldiers to special guardsmen.", "Schools"],
["There are two main Orc clans in Daendroc: The aggressive Blood Clans, and the friendlier Dark Iron Clans.", "Orcs"],
["There are many Schools within Aloria today, of science, culture and combat, all helping to teach those willing a diverse set of skills.", "Schools"],
["There was once a race of sentient trees known as the Nenya, though they are rare sights after the Night of the Fallen Star.", "Nenya"],
["Slizzar, despite being alien in appearance, will often use their beauty (and a little bit of magic) to win over powerful allies.", "Slizzar"],
["Alchemists say that Dwarvish blood has accelerated healing properties that can be applied in medicine.", "Alchemy"],
["The Saivalthar of Saivalé spend their days partying and their nights testing magical experiments.", "Saivalthar"],
["Antelabbits, despite initially looking soft and fuzzy, are carnivorous killers that pose a large threat to explorers.", "Antelabbit"],
["Contrary to popular belief, the Basilisk does not actually petrify those who look into its eyes, although it does tend to kill them.", "Basilisk"],
["Al-Allar and Mu-Allar are the only form of bipedal being capable of regrowing their fingers if they’ve been lost in the past.", "Allar"],
["Altalar that do not learn magic often become Rangers.", "School of Rangers"],
["The School of Turall is ideal for agile Ailor dual-wielders.", "School of Turall"],
["The School of Turall is ideal for agile Ailor dual-wielders.", "School of Turall"],
["Tresmisae Vampires do not necessarily become stupid upon infection, but they do have a heightened difficulty in mental processing.", "Tresmisae"],
["The Viridian Knights of Regalia attend the School of Viridian, where they receive top-of-the-line combat education, at a cost.", "School of Viridian"],
["The Viridian Knights of Regalia attend the School of Viridian, where they receive top-of-the-line military education, at a cost.", "School of Viridian"],
["Those who’ve trained in the School of Blackmark are often seen as lowlifes and scum to those in more prestigious Combat Schools.", "School of Blackmark"],
["The current ruler of Regalia is Emperor Cedromar I Kade, a ruler who has established himself as a military-oriented leader.", "Cedromar Kade"],
["The Highland Ceardians birthed the School of Lecgaen and it remains a strong expression of their Culture.", "School of Lecgaen"],
["Anglian society had to rely on defending themselves in the waning years of the Kingdom of Regalia. From this, the Wapnboggers formed.", "School of Wapnbog"],
["Fearsome Velheim warriors, the students of the School of Skaggers take their name from the now vanished Skagger Horde that once raided and terrified much of the Regalian Archipelago.", "School of Skagger"],
["The exclusive School of Tyrian trains men into Imperial Guards of unparalleled strength and obedience to be used at the Imperial Family’s disposal.", "School of Tyrian"],
["The School of Tenpenny is the only military school accessible to all, but is simultaneously the weakest in comparison to the others.", "School of Tenpenny"],
["The former ruler of Regalia was Emperor Cedromar I Kade, a ruler who established himself as a military-oriented leader but who is today best known as the Imperial Dragon.", "Cedromar Kade"],
["Unionism is the dominant religion of the Regalian Empire, based on the Ten Creeds written by the First Emperor, Theomar the Holy.", "Unionism"],
["Unionism is the dominant religion of the Regalian Empire, based on the Ten Creeds written by the First Emperor, Theomar the Holy.", "Unionism"],
["Vilitatei usually tend to hide in the darkest depths of the sewers, although few have been seen wandering the surface.", "Vilitatei"],
["Followers of Shambala believe that the Sun is the source of all good in the world, and that she blessed the world with Dragons.", "Shambala"],
["The true Faith of Estel died millenia ago, and has now diversified into almost half a dozen varieties between the different Nelfin Races.", "Faith of Estel"],
["Many coastal regions of Hadaria are still recovering from the devastation they suffered during the savage coastal bombardments of the Chrysant War.", "Chrysant War"],
["Most, with the exception of the Sihndar, cannot survive long on Drowda due to the dangerous flora and fauna.", "Drowda"],
["The windy deserts of Farah’deen are dominated by the Songaskian Masaya, but also other nations who once jostled for status and power either against or with the powerful empire.", "Farah’deen"],
["Ithania is a picturesque land of open fields, cossy forests, and is populated by several Races, the Ithanian Ailor the most notable given their odd customs.", "Ithania"],
["Jorrhildr is a land of ice and snow, as well as many savage creatures, but also great and unsolved mysteries.", "Jorrhildr"],
["Nightshade is a frequently-used poison among assassins.", "Nightshade"],
["Nightshade is a frequently-used poison among assassins.", "Nightshade"],
["Tarchlann have a lot of trouble often speaking about nobility and wealth in other languages since such terms don’t exist in their own.", "Tarchlann"],
["Ruby Flowers have many uses in the field of healing.", "Ruby Flower"],
["Orcs claim to have invented the game of Chess, and that the Ailor of Daendroc stole the game Cheukek and made it simpler so the Ailor could understand.", "Orcish Chess"],
["Drachenwald Nuttree are almost extinct, which is a shame for the culinary world.", "Drachenwald Nuttree"],
["The Haurmann is an eggshaped nuisance that despite their lack of any sign of intelligence and several self harming practices, have managed to stay alive.", "Haurmann"],
["Garuda Stalk has a unique dual function, one culinary and another more dastardly. Both have been used by the Sihai at different times in their history.", "Garuda Stalk"],
["Followers of Shambala believe that the Sun is the source of all good in the world, and that covering the head prohibits the wearer from receiving the Sun’s blessings.", "Shambala"],
["Many theorize that the Temple Orphans of Solangeria are unkillable; all attempts to prove this theory wrong have failed.", "Temple Orphan"],
["Slizzar culture has all but vanished following their destruction in and after the Chrysant War as they move to adopt the cultures of others to fit in.", "Chrysant War"],
["Ombratore vampires can drink Goleanon’s Elixir to raise their physical capabilities, though they lose their coercive powers by consuming it.", "Ombratore"],
["Fearsome Northerne berserkers are commonly known as Skaggers.", "School of Skagger"],
["The exclusive Tyrian Order trains Human men into Imperial Guards of unparalleled strength and obedience to be used at the Imperial Family’s disposal.", "Tyrian Order"],
["The Lampar cannot learn Void and Exist magic due to their terrible attention span.", "Lampar"],
["Candle Mice make excellent pets, and even better fire starters.", "Candle Mouse"],
["During the bone-horror crisis, the Ailor of Etosil teamed up with the Undead that live beneath the island to defend their home.", "Undead"],
["Wolathar, otherwise known as Wild Elves, are primitive and stoic Nelfin that hold close connections to nature and their Wódbehaeri beasts.", "Wolathar"],
["Most, with the exception of the Drowdar, do not exist long on the Drowda due to the dangerous flora and fauna.", "Drowda"],
["Despite the many uses of Light Magic, the Discipline of Medicine actively shuns the use of the arcane arts in favor of using alchemy and surgery to treat the wounded.", "Light Magic"],
["The School of Tenpenny is the only military school accessible to all, but is simultaneously the weakest in comparison to the others.", "School of Tenpenny"],
["The Pilgrim’s Flock is a unit of the Regalian Army comprised of solely Dogartan monks armed with maces and wearing nothing but woolen robes.", "Dogartan Unionism"],
["Many theorize that the Temple Orphans of Solangeria are unkillable; all attempts to prove this theory wrong have failed.", "Temple Orphans"],
["One of the few animals that manage to survive in the frozen wasteland of Jorrhildr is the Northern Moose.", "Northern Moose"],
["One of the few animals that manage to survive in the frozen wasteland of Jorrhildr is the Northern Moose.", "Northern Moose"],
["Vile Rats have been found to share a hivemind akin to that of the bumblebee.", "Vile Rats"],
["Ogres are unique beasts in Aloria, humanoid in appearance, large in size, and capable of low intellect.", "Ogres"],
["The Avanthar are a race of brutally territorial horse-lords with the ability to imitate the traits of other races through an ability called “Imprinting.", "Avanthar"],
["Myths of the Longtail Gryphon often exaggerate their appearance, leading to disappointment or confusion in the ill-informed should they ever run into a real one.", "Longtail Gryphon"],
["Despite popular culture, Vampires don't have stronger immune systems than those uninfected with the dark disease.", "Vampires"],
["The Slizzar worship the Deep Sea Serpent, though the savage and carnivorous beasts lack many of the traits the serpentine Race assigns them.", "Deep Sea Serpent"],
["It's believed the Elasmo horn is a valuable ingredient in an ‘immortality potion.", "Elasmo"],
["The meat of the Nordskag Kreb is delicious, and the creature is commonly served abroad in non-Velheim regions.", "Nordskag Kreb"],
["It is said that there is a shadowy organization that watches all in every corner of the city. It doesn’t exist.", "Black Order"],
["Grand Papillons are brilliantly colored creatures, possessing vivid shades of red, green and yellow depending on their gender.", "Grand Papillon"],
["Many Regalian scholars claim that Primal Magic is actually just an exorcism of the spirits.", "Primal Magic"],
["The Haurmann is an egg shaped nuisance that despite their lack of any sign of intelligence and several self harming practices, have managed to stay alive.", "Haurmann"],
["Those who’ve trained in the School of Blackmark are often seen as lowlifes and scum to those in special combat schools.", "School of Blackmark"],
["There was once a Race of sentient trees known as the Nenya, though they are rare sights after the Night of the Fallen Star that took place in the twilight of the Allorn Empire.", "Nenya"],
["Before the spread of Ch'ien-ji knowledge on astronomy it was heavily implicated that the known world of Aloria was flat and infinite.", "Astronomy"],


];
];

Revision as of 12:28, 6 September 2019

/*
* TRIVIA AT BOTTOM OF ACCREDITATION.
* ----------------------------------
*/
var a = [
	
	["Ailor are the most populous Race in all of Aloria, and as a result, are often the most affluent as well.", "Ailor"],
	["The Sihai are the most distant Race, living beyond Aloria on the continent of Dexai in the Far East.", "Sihai"],
	["The Qadir are a Race with a past lost, destroyed by the Great Storm brought by the ancestors of the Songaskians. Now, all they have left is their clockwork, which many devote their lives to.", "Qadir"],
	["The Songaskia are the children of the Black Desert Dragon, and since they have emerged, they have dominated Farah’deen for over a century and a half.", "Songaskia"],
	["The Dwarves are a Race marred by tragedy, losing much of their population after they dug too deep under the earth, unleashing the relentless Dakkar that eventually destroyed all but two of their great Holds.", "Dwarf"],
	["Orcs are often considered the strongest, yet dumbest, Race in Aloria. ", "Orc"],
	["Orcs are often stereotyped to all be green. In fact, there are several colorations to their skin tone that is based on what Tribe they come from.", "Orcs"],
	["The Url are perhaps the most unique Race in Aloria, being a mutually-beneficial union between an exotic and alien Oorl Worm and a host body.", "Url"],
	["Varran are one of the most diverse Races in Aloria, divided into countless subraces of mammalian life and live scattered across the whole of Daen.", "Varran"],
	["Slizzar, despite being alien in their natural appearance, have the ability to transform into two different, Shifted, forms in order to appeal better to others.", "Slizzar"],
	["Allar possess a remarkably firm caste system that has ruled their society for generations.", "Allar"],
	["The Maraya are perhaps the oldest Race in Aloria, having survived the Void Cycle asleep within the earth only to awaken in the wake of the Cataclysm 300 years ago.", "Maraya"],
	["Yanar are beings of living plant matter created by the goddess Estel in the final years before the Cataclysm in an attempt to warn the Altalar of their folly. They failed in this task, and are now spread about the world, each Yanar seeking their own path.", "Yanar"],
	["All Altalar have the ability to acquire a Ring of Power, so long as they are pious and devoted enough to the Altalar Pantheon.", "Altalar"],
	["The Avanthar are a Race of territorial horse-lords with the ability to imitate the traits of other Races through an ability called “Casting.”", "Avanthar"],
	["Kathar were once just Void Worshipping Altalar, but they gave up their appearance and powers to fully gain access to the power of the Void for their own uses.", "Kathar"],
	["The Isldar protected the last Violet Night Dragon on Ellador and when it was finally killed by Dwarves, the spell they enacted changed the world.", "Isldar"],
	["The Cielothar are pacifistic animal-tenders, but have suffered much in recent years as the Regalian Empire has expanded into their territory.", "Cielothar"],
	["Sihndar have many strange abilities and even stranger beliefs, likely due to their extreme isolation in the distant north of Aloria and because of their creation as a result of warping, corrupting Essences.", "Sihndar"],
	["Half Races can be rather exotic beings, and even Races some think would be totally incompatible with each other actually are.", "Half Races"],
	["Despite popular culture, Vampires don't have stronger immune systems than those uninfected with the dark disease.", "Vampires"],
	["The Allorn Empire dominated Aloria for millennia with Magic and remarkable innovations. Unfortunately, much of this was lost to both the Wildering and the Cataclysm.", "Allorn Empire"],
	["The Regalian Empire is rivalled only by the Songaskian Masaya in terms of power and authority.", "Songaskian Masaya"],
	["The Kingdom of Nordskag is a wild place, with open expansions of wilderness and varied Velheim people living in it.", "Kingdom of Nordskag"],
	["Magic is a very uncommon sight in Regalia, and most shun its existence and usage.", "Magic"],
	["The Regalian Empire is home to a number of Combat Schools that help to train all sorts of combatants, from knights to foot soldiers to special guardsmen.", "Schools"],
	["There are many Schools within Aloria today, of science, culture and combat, all helping to teach those willing a diverse set of skills.", "Schools"],
	["The School of Turall is ideal for agile Ailor dual-wielders.", "School of Turall"],
	["The Viridian Knights of Regalia attend the School of Viridian, where they receive top-of-the-line combat education, at a cost.", "School of Viridian"],
	["Those who’ve trained in the School of Blackmark are often seen as lowlifes and scum to those in more prestigious Combat Schools.", "School of Blackmark"],
	["The Highland Ceardians birthed the School of Lecgaen and it remains a strong expression of their Culture.", "School of Lecgaen"],
	["Anglian society had to rely on defending themselves in the waning years of the Kingdom of Regalia. From this, the Wapnboggers formed.", "School of Wapnbog"],
	["Fearsome Velheim warriors, the students of the School of Skaggers take their name from the now vanished Skagger Horde that once raided and terrified much of the Regalian Archipelago.", "School of Skagger"],
	["The exclusive School of Tyrian trains men into Imperial Guards of unparalleled strength and obedience to be used at the Imperial Family’s disposal.", "School of Tyrian"],
	["The School of Tenpenny is the only military school accessible to all, but is simultaneously the weakest in comparison to the others.", "School of Tenpenny"],
	["The former ruler of Regalia was Emperor Cedromar I Kade, a ruler who established himself as a military-oriented leader but who is today best known as the Imperial Dragon.", "Cedromar Kade"],
	["Unionism is the dominant religion of the Regalian Empire, based on the Ten Creeds written by the First Emperor, Theomar the Holy.", "Unionism"],
	["Followers of Shambala believe that the Sun is the source of all good in the world, and that she blessed the world with Dragons.", "Shambala"],
	["The true Faith of Estel died millenia ago, and has now diversified into almost half a dozen varieties between the different Nelfin Races.", "Faith of Estel"],
	["Many coastal regions of Hadaria are still recovering from the devastation they suffered during the savage coastal bombardments of the Chrysant War.", "Chrysant War"],
	["Most, with the exception of the Sihndar, cannot survive long on Drowda due to the dangerous flora and fauna.", "Drowda"],
	["The windy deserts of Farah’deen are dominated by the Songaskian Masaya, but also other nations who once jostled for status and power either against or with the powerful empire.", "Farah’deen"],
	["Ithania is a picturesque land of open fields, cossy forests, and is populated by several Races, the Ithanian Ailor the most notable given their odd customs.", "Ithania"],
	["Jorrhildr is a land of ice and snow, as well as many savage creatures, but also great and unsolved mysteries.", "Jorrhildr"],
	["Nightshade is a frequently-used poison among assassins.", "Nightshade"],
	["Ruby Flowers have many uses in the field of healing.", "Ruby Flower"],
	["Drachenwald Nuttree are almost extinct, which is a shame for the culinary world.", "Drachenwald Nuttree"],
	["Garuda Stalk has a unique dual function, one culinary and another more dastardly. Both have been used by the Sihai at different times in their history.", "Garuda Stalk"],
	["Many theorize that the Temple Orphans of Solangeria are unkillable; all attempts to prove this theory wrong have failed.", "Temple Orphan"],
	["One of the few animals that manage to survive in the frozen wasteland of Jorrhildr is the Northern Moose.", "Northern Moose"],
	["Ogres are unique beasts in Aloria, humanoid in appearance, large in size, and capable of low intellect.", "Ogres"],
	["Myths of the Longtail Gryphon often exaggerate their appearance, leading to disappointment or confusion in the ill-informed should they ever run into a real one.", "Longtail Gryphon"],
	["The Slizzar worship the Deep Sea Serpent, though the savage and carnivorous beasts lack many of the traits the serpentine Race assigns them.", "Deep Sea Serpent"],
	["The meat of the Nordskag Kreb is delicious, and the creature is commonly served abroad in non-Velheim regions.", "Nordskag Kreb"],
	["Grand Papillons are brilliantly colored creatures, possessing vivid shades of red, green and yellow depending on their gender.", "Grand Papillon"],
	["The Haurmann is an egg shaped nuisance that despite their lack of any sign of intelligence and several self harming practices, have managed to stay alive.", "Haurmann"],
	["There was once a Race of sentient trees known as the Nenya, though they are rare sights after the Night of the Fallen Star that took place in the twilight of the Allorn Empire.", "Nenya"],

	];
var pre = "<b>Did You Know?</b> "
var randomValue = a[Math.floor(a.length * Math.random())];

var url = "<a href='http://wiki.massivecraft.com/" + randomValue[1] + "'>here</a>."

document.getElementById("trivia").innerHTML = pre +  randomValue[0];
document.getElementById("read").innerHTML = url;


/**
 * Collapsible tables
 *
 * Allows tables to be collapsed, showing only the header. See [[Wikipedia:NavFrame]].
 *
 * @version 2.0.3 (2014-03-14)
 * @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-collapsibleTables.js
 * @author [[User:R. Koot]]
 * @author [[User:Krinkle]]
 * @deprecated Since MediaWiki 1.20: Use class="mw-collapsible" instead which
 * is supported in MediaWiki core.


var autoCollapse = 2;
var collapseCaption = 'hide';
var expandCaption = 'show';
var tableIndex = 0;

function collapseTable( tableIndex ) {
    var Button = document.getElementById( 'collapseButton' + tableIndex );
    var Table = document.getElementById( 'collapsibleTable' + tableIndex );

    if ( !Table || !Button ) {
        return false;
    }

    var Rows = Table.rows;
    var i;

    if ( Button.firstChild.data === collapseCaption ) {
        for ( i = 1; i < Rows.length; i++ ) {
            Rows[i].style.display = 'none';
        }
        Button.firstChild.data = expandCaption;
    } else {
        for ( i = 1; i < Rows.length; i++ ) {
            Rows[i].style.display = Rows[0].style.display;
        }
        Button.firstChild.data = collapseCaption;
    }
}

function createClickHandler( tableIndex ) {
    return function ( e ) {
        e.preventDefault();
        collapseTable( tableIndex );
    };
}

function createCollapseButtons( $content ) {
    var NavigationBoxes = {};
    var $Tables = $content.find( 'table' );
    var i;

    $Tables.each( function( i, table ) {
        if ( $(table).hasClass( 'collapsible' ) ) {

            /* only add button and increment count if there is a header row to work with EDIT HERE WITH COMMENTS
            var HeaderRow = table.getElementsByTagName( 'tr' )[0];
            if ( !HeaderRow ) {
                return;
            }
            var Header = table.getElementsByTagName( 'th' )[0];
            if ( !Header ) {
                return;
            }

            NavigationBoxes[ tableIndex ] = table;
            table.setAttribute( 'id', 'collapsibleTable' + tableIndex );

            var Button     = document.createElement( 'span' );
            var ButtonLink = document.createElement( 'a' );
            var ButtonText = document.createTextNode( collapseCaption );
            // Styles are declared in [[MediaWiki:Common.css]]
            Button.className = 'collapseButton';

            ButtonLink.style.color = Header.style.color;
            ButtonLink.setAttribute( 'id', 'collapseButton' + tableIndex );
            ButtonLink.setAttribute( 'href', '#' );
            $( ButtonLink ).on( 'click', createClickHandler( tableIndex ) );
            ButtonLink.appendChild( ButtonText );

            Button.appendChild( document.createTextNode( '[' ) );
            Button.appendChild( ButtonLink );
            Button.appendChild( document.createTextNode( ']' ) );

            Header.insertBefore( Button, Header.firstChild );
            tableIndex++;
        }
    } );

    for ( i = 0;  i < tableIndex; i++ ) {
        if ( $( NavigationBoxes[i] ).hasClass( 'collapsed' ) ||
            ( tableIndex >= autoCollapse && $( NavigationBoxes[i] ).hasClass( 'autocollapse' ) )
        ) {
            collapseTable( i );
        }
        else if ( $( NavigationBoxes[i] ).hasClass ( 'innercollapse' ) ) {
            var element = NavigationBoxes[i];
            while ((element = element.parentNode)) {
                if ( $( element ).hasClass( 'outercollapse' ) ) {
                    collapseTable ( i );
                    break;
                }
            }
        }
    }
}

mw.hook( 'wikipage.content' ).add( createCollapseButtons ); 

*/