Template:Game

From the Kingdom Hearts Wiki, the Kingdom Hearts encyclopedia
Revision as of 20:21, 4 October 2009 by Guardian Soul (talk | contribs)
Jump to navigationJump to search

function showGames(className) {

   if(typeof(SKIP_GAMES) != 'undefined' && SKIP_GAMES)
       return;
   var titleDiv = document.getElementById(className);
   if(titleDiv == null || titleDiv == undefined)
       return;
   var cloneNode = titleDiv.cloneNode(true);
   var firstHeading = getFirstHeading();
   firstHeading.insertBefore(cloneNode, firstHeading.childNodes[0]);
   cloneNode.style.display = "block";

}

function getFirstHeading() {

   var elements = getElementsByClass('firstHeading', document.getElementById('content'), 'h1');
   return (elements != null && elements.length > 0) ? elements[0] : null;

}

function moveRating() {

   var elements = getElementsByClass('ratings-top', document.getElementById('content'), 'div');
   if(elements[0] == null || elements[0] == undefined)
       return;
   var cloneNode = elements[0].cloneNode(true);
   var firstHeading = getFirstHeading();
   firstHeading.insertBefore(cloneNode, firstHeading.childNodes[0]);
   cloneNode.style.display = "block";

}

moveRating(); showGames('title-linktabs');


function showGames(className) {

   if(typeof(SKIP_GAMES) != 'undefined' && SKIP_GAMES)
       return;
   var titleDiv = document.getElementById(className);
   if(titleDiv == null || titleDiv == undefined)
       return;
   var cloneNode = titleDiv.cloneNode(true);
   var firstHeading = getFirstHeading();
   firstHeading.insertBefore(cloneNode, firstHeading.childNodes[0]);
   cloneNode.style.display = "block";

}

function getFirstHeading() {

   var elements = getElementsByClass('firstHeading', document.getElementById('content'), 'h1');
   return (elements != null && elements.length > 0) ? elements[0] : null;

}

function moveRating() {

   var elements = getElementsByClass('ratings-top', document.getElementById('content'), 'div');
   if(elements[0] == null || elements[0] == undefined)
       return;
   var cloneNode = elements[0].cloneNode(true);
   var firstHeading = getFirstHeading();
   firstHeading.insertBefore(cloneNode, firstHeading.childNodes[0]);
   cloneNode.style.display = "block";

}

moveRating(); showGames('title-linktabs');


See also Template:gameicon

List of Images

Variables

{{game| }}

Use the below variables to indicate what references were used to generate the article's information.

{{game|KH1}} - Kingdom Hearts
{{game|FM1}} - Kingdom Hearts Final Mix
{{game|VCAST}} - Kingdom Hearts V CAST
{{game|COM}} - Kingdom Hearts: Chain of Memories
{{game|REC}} - Kingdom Hearts Re: Chain of Memories
{{game|KH2}} - Kingdom Hearts II
{{game|FM2}} - Kingdom Hearts II Final Mix
{{game|358}} - Kingdom Hearts 358/2 Days
{{game|KHC}} - Kingdom Hearts coded
{{game|KHM}} - Kingdom Hearts Mobile
{{game|BBS}} - Kingdom Hearts Birth by Sleep