MediaWikiCommon.js

/* Any JavaScript here will be loaded for all users on every page load. */

/**************************************************************/
/* sliders using jquery by User:Tierrie in Dragon Age Wiki */
/**************************************************************/
//wsl.loadScript("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js");
//wsl.loadScript("http://dragonage.wikia.com/index.php?title=MediaWiki:Jquery-ui.min.js&action=raw&ctype=text/javascript");

mw.loader.using( 'jquery.ui.tabs', function() {
$(document).ready(function() {
  var $tabs = $("").tabs({ fx: {opacity:'toggle', duration:100} } );
  $("class^=portal_sliderlink").click(function() { // bind click event to link
    $tabs.tabs('select', this.className.replace("portal_sliderlink_", ""));
    return false;
  });
  $('').click(function() {
    $tabs.tabs('select', ($tabs.tabs('option', 'selected') == ($tabs.tabs('length'))-1) ? 0 : $tabs.tabs('option', 'selected') + 1 ); // switch to next tab
    return false;
  });
  $('').click(function() { // bind click event to link
    $tabs.tabs('select', ($tabs.tabs('option', 'selected') == 0) ? ($tabs.tabs('length')-1) : $tabs.tabs('option', 'selected') - 1 ); // switch to previous tab
    return false;
  });
});
} );
// **************************************************
// Experimental javascript countdown timer (Splarka)
// Version 0.0.3
// **************************************************
//
// Usage example:
//  
//  Javascript disabled.
 
function updatetimer(i) {
  var now = new Date();
  var then = timersi.eventdate;
  var diff = count=Math.floor((then.getTime()-now.getTime())/1000);
 
  // catch bad date strings
  if(isNaN(diff)) { 
    timersi.firstChild.nodeValue = '** ' + timersi.eventdate + ' **' ;
    return;
  }
 
  // determine plus/minus
  if(diff<0) {
    diff = -diff;
    var tpm = 'T plus ';
  } else {
    var tpm = 'T minus ';
  }
 
  // calcuate the diff
  var left = (diff%60) + ' seconds';
    diff=Math.floor(diff/60);
  if(diff > 0) left = (diff%60) + ' minutes ' + left;
    diff=Math.floor(diff/60);
  if(diff > 0) left = (diff%24) + ' hours ' + left;
    diff=Math.floor(diff/24);
  if(diff > 0) left = diff + ' days ' + left
  timersi.firstChild.nodeValue = tpm + left;
 
  // a setInterval() is more efficient, but calling setTimeout()
  // makes errors break the script rather than infinitely recurse
  timeoutsi = setTimeout('updatetimer(' + i + ')',1000);
}
 
function checktimers() {
  //hide 'nocountdown' and show 'countdown'
  var nocountdowns = getElementsByClassName(document, 'span', 'nocountdown');
  for(var i in nocountdowns) nocountdownsi.style.display = 'none'
  var countdowns = getElementsByClassName(document, 'span', 'countdown');
  for(var i in countdowns) countdownsi.style.display = 'inline'
 
  //set up global objects timers and timeouts.
  timers = getElementsByClassName(document, 'span', 'countdowndate');  //global
  timeouts = new Array(); // generic holder for the timeouts, global
  if(timers.length == 0) return;
  for(var i in timers) {
    timersi.eventdate = new Date(timersi.firstChild.nodeValue);
    updatetimer(i);  //start it up
  }
}
addOnloadHook(checktimers);
 
// **************************************************
//  - end -  Experimental javascript countdown timer
// **************************************************
{{Deus Ex: Human Revolution image}}
{{Deus_Ex:_Human_Revolution_image}}

{{{1|{{Portal/Component/Slider}}}}}
{|class="portal_container" width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-top: 1em;"
|-
|width="50%" valign="top"|{{Portal/Component/News}}
|
|width="50%" valign="top"|{{Portal/Component/NoticeBoard}}{{Portal/Component/VideoSlider}}{{Portal/Component/Statistics}}{{Portal/Component/Chat}}{{Portal/Component/Answers}} |} {{Portal/Component/Polls}}{{Portal/Component/Images}}{{Portal/Component/Quotes}}{{Portal/Component/Help}} __NOTOC__ __NOEDITSECTION__ de: es: fr: ja: pl: ru: Category:Deus Ex Wiki|
{{Deus_Ex:_Human_Revolution_image}}
{{Delete|not used/poor quality/useless - was replaced a while ago with better picture}}
{{Deus_Ex:_Human_Revolution_image}}