Community Central
Community Central
No edit summary
No edit summary
Line 36: Line 36:
 
});
 
});
 
//</pre>
 
//</pre>
 
/* SkinSwitchButton */
 
importScriptPage( 'SkinSwitchButton/code.js', 'dev' );
 
   
 
/* BackToTopButton */
 
/* BackToTopButton */

Revision as of 01:36, 23 September 2012

/* Fixed Chat Hacks */
importScriptPage('User:Foodbandlt/FixedChatHacks.js', 'c');

/* PMs button */
if(wgCanonicalSpecialPageName == 'Chat') {
function createGroupPM() {
var users = prompt('Enter comma seperated list of users to start a PM with','');
var users = users.split(',');
mainRoom.openPrivateChat(users);
}
$('form#Write').append('<a class="wikia-button" href="javascript:createGroupPM()" style="position:absolute; right:50px; top:0;">PM</a>');
}

//<pre>
// ============================================================
// displayTimer
// ============================================================
 
var refreshDate;
 
function addDate() {
    var UTCDate = ((new Date()).toUTCString()).replace("GMT", "(UTC)");
    $('#showdate').empty().append('<span style="font-weight: bold; text-transform: none;"><a title="Purge the server cache and update the contents of this page." href="' + wgArticlePath.replace('$1', wgPageName.replace(/ /g, '_')) + '?action=purge">' + UTCDate.substring(5) + '</a></span>');
    window.clearTimeout(refreshDate);
    refreshDate = window.setTimeout(addDate, 5000);
}
 
$(document).ready(function() {
    if (skin == 'oasis') 
        $('<li id="displayTimer"><span id="showdate"></span></li>').appendTo('#GlobalNavigation');
    else
        $('#p-personal ul').prepend('<li><span id="showdate"></span></li>');
    addDate();
    refreshDate = window.setTimeout(addDate, 5000);
    $('#displayTimer').css({'font-size': "12px"});
});
//</pre>

/* BackToTopButton */
importScriptPage('BackToTopButton/code.js', 'dev');

/* InactiveUsers */
importScriptPage('InactiveUsers/code.js', 'dev');

importScriptPage('AjaxRC/code.js', 'dev');
function AddRecentChanges() {
	$('div.buttons').css({'width': '310px'});
	$('a[data-id="wikiactivity"]').after('<a href="/wiki/Special:RecentChanges" title="Special:RecentChanges" class="wikia-button secondary" data-id="recentchanges" style="margin-left:8px">Recent Changes</a>');
}
 
addOnloadHook(AddRecentChanges);
 
/* Auto Refresh */
AjaxRCRefreshText = 'Auto-refresh';
AjaxRCRefreshHoverText = 'Automatically refresh the page';
ajaxPages = ["Special:RecentChanges","Special:WikiActivity"];
importScriptPage('AjaxRC/code.js', 'dev');