Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
// ============================================================
// displayTimer - 2/1/11
// ============================================================
//Add a clock to the WikiHeader
//Modified from work by Patrick Westerhoff [poke]:
//http://bulbapedia.bulbagarden.net/wiki/MediaWiki:Monobook.js
hookEvent( 'load', displayTimer );
function displayTimer ()
{
if ( typeof( timerDisplay ) !== 'undefined' && timerDisplay === false )
return;
var date;
if (skin == 'oasis')
{
var timerParent = document.getElementById( 'WikiHeader' ).getElementsByTagName( 'div' )[0];
}
if (skin == 'monobook')
{
var timerParent = document.getElementById( 'p-personal' ).getElementsByTagName( 'ul' )[0];
}
var timerLink = document.createElement( 'a' );
var timerObj = document.createElement( 'li' );
timerLink.href = '/wiki/' + wgPageName + '?action=purge';
timerLink.title = 'Purge the server cache and update the contents of this page.'
timerObj.id = 'displayTimer';
timerObj.style.textTransform = 'none';
timerObj.style.fontWeight = 'bold';
timerObj.style.fontSize = '100%';
timerObj.appendChild( timerLink );
timerParent.insertBefore( timerObj, timerParent.firstChild );
if (skin == 'oasis')
{
$('#displayTimer').css({'position': "inherit", 'right': "0px", 'top': "-28px"});
}
var month = new Array(12);
month[0] = "Jan";
month[1] = "Feb";
month[2] = "Mar";
month[3] = "Apr";
month[4] = "May";
month[5] = "Jun";
month[6] = "Jul";
month[7] = "Aug";
month[8] = "Sep";
month[9] = "Oct";
month[10] = "Nov";
month[11] = "Dec";
function actualizeUTC ()
{
timerDate = new Date();
timerLink.innerHTML = ( timerDate.getUTCDate() < 10 ? '0' : '' ) + timerDate.getUTCDate() + ' '
+ ( timerDate.getUTCMonth() < 10 ? '' : '' ) + month[timerDate.getUTCMonth()] + ' '
+ ( timerDate.getUTCFullYear() < 10 ? '0' : '' ) + timerDate.getUTCFullYear() + ' '
+ ( timerDate.getUTCHours() < 10 ? '0' : '' ) + timerDate.getUTCHours() + ':'
+ ( timerDate.getUTCMinutes() < 10 ? '0' : '' ) + timerDate.getUTCMinutes() + ':'
+ ( timerDate.getUTCSeconds() < 10 ? '0' : '' ) + timerDate.getUTCSeconds() + ' (UTC)';
}
function actualizeCustom ()
{
timerDate = new Date();
timerDate.setMinutes ( timerDate.getMinutes() + timerDate.getTimezoneOffset() + timerTimezone * 60 );
timerLink.innerHTML = ( timerDate.getDate() < 10 ? '0' : '' ) + timerDate.getDate() + ' '
+ ( timerDate.getMonth() < 10 ? '' : '' ) + month[timerDate.getMonth()] + ' '
+ ( timerDate.getFullYear() < 10 ? '0' : '' ) + timerDate.getFullYear() + ' '
+ ( timerDate.getHours() < 10 ? '0' : '' ) + timerDate.getHours() + ':'
+ ( timerDate.getMinutes() < 10 ? '0' : '' ) + timerDate.getMinutes() + ':'
+ ( timerDate.getSeconds() < 10 ? '0' : '' ) + timerDate.getSeconds()
+ ' (UTC' + ( timerTimezone < 0 ? '' : '+' ) + timerTimezone + ')';
}
// start
if ( typeof( timerTimezone ) !== 'number' )
{
actualizeUTC();
setInterval( actualizeUTC, 1000 );
}
else
{
actualizeCustom();
setInterval( actualizeCustom, 1000 );
}
}
// ============================================================
// wikiSidething
//
// Function: Adds a counter
// ============================================================
$(function() {
if(skin == "oasis") {
var $sidebar = $('.WikiaPagesOnWikiModule:first');
var comboString = "<div style='margin-top:5px; align:center'><table style='width:100%'><td style='*'><a href='http://bioadvent.wikia.com/wiki/BIONICLE_Adventures_Fanon_Wiki'>BIONICLE Adventures Wiki</a><br /></td><td style='http://bioadvent.wikia.com/wiki/BIONICLE_Adventures_Fanon_Wiki' target='_top'><img src='http://images1.wikia.nocookie.net/common/avatars/thumb/7/7f/1251589.png/100px-1251589.png' alt='LEGO Universe' border=0 /></a></td></tr></table></div>";
$sidebar.html($sidebar.html() + comboString);
} else if(skin == "monobook") {
var $sidebar = $('#p-wikicities-nav');
var comboString = "<img src='http://images2.wikia.nocookie.net/custombionicle/images/thumb/a/a6/FireMythran.png/100px-FireMythran.png' alt='LEGO Universe' border=0 />";
$sidebar.html($sidebar.html() + comboString);
}
});
/* shrink the side rail to add content space when rail is present - 2/1/11 */
/* only works with proper css - see [[Forum:Why not get rid of the right sidebar altogether?]] */
function ShrinkRail() {
if( $('article#WikiaMainContent.WikiaMainContent').width() < 1000 ) {
$('header#WikiaPageHeader.WikiaPageHeader details').css({"width": '750px'});
$('article#WikiaMainContent.WikiaMainContent').css({"width": '760px'});
$('div#catlinks.catlinks').css({"width": '718px'});
$('div#WikiaRail.WikiaRail').css({"width": '220px'});
$('form#WikiaSearch').css({"width": '218px'});
$('form#WikiaSearch input[type="text"]').css({"width": '210px'});
$('div#WikiaRail a.wikia-button.upphotos').replaceWith('<a href="/wiki/Special:Upload" title="Add a Photo" class="wikia-button upphotos" style="width:30px; margin-top:0;"> <img src="http://images1.wikia.nocookie.net/__cb32790/common/skins/common/blank.gif" height="0" width="0" class="sprite photo" style="margin:0;"> </a>');
$('div#WikiaRail a.wikia-button.createpage').replaceWith('<a href="/wiki/Special:CreatePage" title="Create a new page on this wiki" class="wikia-button createpage" style="width:25px; margin-top:0;"> <img src="http://images1.wikia.nocookie.net/__cb32790/common/skins/common/blank.gif" height="0" width="0" class="sprite new" style="margin:0;"> </a>');
$('div#WikiaRail a.wikia-button[href="/wiki/Special:CreateBlogPage"]').replaceWith('<a href="/wiki/Special:CreateBlogPage" title="Create blog post" class="wikia-button" style="width:25px"><img src="http://images1.wikia.nocookie.net/__cb32790/common/skins/common/blank.gif" height="0" width="0" class="sprite blog" style="margin-left:4px;"></a>');
}
}
addOnloadHook(ShrinkRail);
/* add a button that increases the content size and hides the rail - 2/1/11 */
function CreateContentResizeButton() {
var headerWidth = $('header#WikiaPageHeader.WikiaPageHeader details').width();
var contentWidth = $('article#WikiaMainContent.WikiaMainContent').width();
var catlinksWidth = $('div#catlinks.catlinks').width();
if(contentWidth < 1000) {
$('section article header ul.wikia-menu-button').after('<ul class="wikia-menu-button" id="resizeButton" style="margin-left:10px"><a onclick="ExpandContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" style="color:#fff;" title="Expands the content area. Note that this will hide the side rail."> Expand <--> </a></ul>');
$('section article header a.wikia-button').after('<ul class="wikia-menu-button" id="resizeButton" style="margin-left:10px"><a onclick="ExpandContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" style="color:#fff;" title="Expands the content area. Note that this will hide the side rail."> Expand <--> </a></ul>');
$('section article header a.view-source').after('<ul class="wikia-menu-button" id="resizeButton" style="margin-left:10px"><a onclick="ExpandContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" style="color:#fff;" title="Expands the content area. Note that this will hide the side rail."> Expand <--> </a></ul>');
if(wgCanonicalNamespace == 'User_blog') {
$('section article div#WikiaUserPagesHeader a.wikia-button').after('<ul class="wikia-menu-button" id="resizeButton" style="margin-left:10px"><a onclick="ExpandContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" style="color:#fff;" title="Expands the content area. Note that this will hide the side rail."> Expand <--> </a></ul>');
}
}
}
addOnloadHook(CreateContentResizeButton);
function ExpandContent(headerWidth, contentWidth, catlinksWidth) {
$('header#WikiaPageHeader.WikiaPageHeader details').css({"width": '980px'});
$('article#WikiaMainContent.WikiaMainContent').css({"width": '1000px'});
$('div#catlinks.catlinks').css({"width": '1000px'});
$('div#WikiaRail.WikiaRail').css({"display": 'none'});
$('ul#resizeButton').replaceWith('<ul class="wikia-menu-button" id="resizeButton" style="margin-left:10px"><a onclick="CompressContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" style="color:#fff;" title="Compress the content area back to its original width, and restore the side rail."> Compress >--< </a></ul>');
}
function CompressContent(headerWidth, contentWidth, catlinksWidth) {
$('header#WikiaPageHeader.WikiaPageHeader details').css({"width": headerWidth});
$('article#WikiaMainContent.WikiaMainContent').css({"width": contentWidth});
$('div#catlinks.catlinks').css({"width": catlinksWidth});
$('div#WikiaRail.WikiaRail').css({"display": 'block'});
$('ul#resizeButton').replaceWith('<ul class="wikia-menu-button" id="resizeButton" style="margin-left:10px"><a onclick="ExpandContent(' + headerWidth + ', ' + contentWidth + ', ' + catlinksWidth + ');" data-id="resizeButton" style="color:#fff;" title="Expands the content area. Note that this will hide the side rail."> Expand <--> </a></ul>');
}
if (mwCustomEditButtons) {
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://images.wikia.com/central/images/7/74/Button_comment.png",
"speedTip": "Add sig on Wiki",
"tagOpen": "",
"tagClose": "{{User:Flex217/sig}}",
"sampleText": ""}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////
// ADVANCED AJAX AUTO-REFRESHING ARTICLES
// Code courtesy of "pcj" of WoWWiki.
// Bug fixes and maintenance by Grunny
///////////////////////////////////////////////////////////////////////////////////////////////////////////
var indicator = 'http://i25.servimg.com/u/f25/16/05/86/66/poptar10.gif';
if (!window.ajaxPages) ajaxPages = new Array("Special:WikiActivity");
var ajaxTimer;
var ajaxRefresh = 60000;
var refreshText = 'Automatically refresh';
if( typeof AjaxRCRefreshText == "string" ) {
refreshText = AjaxRCRefreshText;
}
var refreshHover = 'Enable auto-refreshing page loads';
if( typeof AjaxRCRefreshHoverText == "string" ) {
refreshHover = AjaxRCRefreshHoverText;
}
var doRefresh = true;
function setCookie(c_name,value,expiredays) {
var exdate=new Date()
exdate.setDate(exdate.getDate()+expiredays)
document.cookie=c_name+ "=" +escape(value) + ((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
}
function getCookie(c_name) {
if (document.cookie.length>0) {
c_start=document.cookie.indexOf(c_name + "=")
if (c_start!=-1) {
c_start=c_start + c_name.length+1
c_end=document.cookie.indexOf(";",c_start)
if (c_end==-1) c_end=document.cookie.length
return unescape(document.cookie.substring(c_start,c_end))
}
}
return ""
}
function preloadAJAXRL() {
ajaxRLCookie = (getCookie("ajaxload-"+wgPageName)=="on") ? true:false;
appTo = ($("#WikiaPageHeader").length)?$("#WikiaPageHeader"):$(".firstHeading");
appTo.append(' <span style="font-size: xx-small; line-height: 100%;" id="ajaxRefresh"><span style="border-bottom: 1px dotted; cursor: help;" id="ajaxToggleText" title="' + refreshHover + '">' + refreshText + ':</span><input type="checkbox" style="margin-bottom: 0;" id="ajaxToggle"><span style="display: none;" id="ajaxLoadProgress"><img src="' + indicator + '" style="vertical-align: baseline;" border="0" alt="AJAX operation in progress" /></span></span>');
$("#ajaxLoadProgress").bind("ajaxSend", function (){
$(this).show();
}).bind("ajaxComplete", function (){
$(this).hide();
});
$("#ajaxToggle").click(toggleAjaxReload);
$("#ajaxToggle").attr("checked", ajaxRLCookie);
if (getCookie("ajaxload-"+wgPageName)=="on") loadPageData();
}
function toggleAjaxReload() {
if ($("#ajaxToggle").attr("checked") == true) {
setCookie("ajaxload-"+wgPageName, "on", 30);
doRefresh = true;
loadPageData();
} else {
setCookie("ajaxload-"+wgPageName, "off", 30);
doRefresh = false;
clearTimeout(ajaxTimer);
}
}
function loadPageData() {
var cC = ($("#WikiaArticle").length)?"#WikiaArticle":"#bodyContent";
$(cC).load(location.href + " " + cC + " > *", function (data) {
if (doRefresh) ajaxTimer = setTimeout("loadPageData();", ajaxRefresh);
});
}
$(function () {
for (x in ajaxPages) {
if (wgPageName == ajaxPages[x] && $("#ajaxToggle").length==0) preloadAJAXRL();
}
});
///////////////////////////////////////////////////////////////////////////////////////////////////////////
// END OF AJAX AUTO-REFRESH
///////////////////////////////////////////////////////////////////////////////////////////////////////////
importScriptURI("http://vda.wikia.com/index.php?action=raw&ctype=text/javascript&title=MediaWiki%3AVDA2.js&cache=" + Math.random());
window.addEventListener("load", function () {
var eb = document.getElementById("wpTextbox1");
if (eb) {
eb.select();
}
}, false);
window.addEventListener("load", function () {
var me = document.getElementById("wpMinoredit");
if (me) {
me.setAttribute("checked", "checked");
}
var eb = document.getElementById("wpTextbox1");
eb.value = eb.value.replace(/<\/?noinclude>/, "");
}, false);