User:Eladkse/global.js

importScriptPage('MediaWiki:AjaxRC.js', 'casualty');

function UserItems { $('#AccountNavigation ul.subnav li:first-child').after('My blogMy contributionsMy watchlist'); $('.page-User_Eladkse #WikiaUserPagesHeader li[data-id="following"]').replaceWith('Watchlist'); } addOnloadHook(UserItems);

function PurgeDropdownMenuItem { if( wgNamespaceNumber >= 0 && !window.PurgeButtonsLoaded && document.getElementById('control_purge') == null && wgNamespaceNumber != 500 && wgNamespaceNumber != 502 ) { addOnloadHook( addPurgeButton ); }	var PurgeButtonsLoaded = true; // prevent duplicate running (but not dupe buttons from outside this code)

function addPurgeButton { var theText = 'Purge'; //default text, ala SMW if( typeof PurgeButtonText == "string" ) { theText = PurgeButtonText; }

switch( skin ) { case 'uncyclopedia': /* monobook clone, pass to monobook */ case 'wowwiki': /* monobook clone, pass to monobook */ case 'lostbook': /* monobook clone, pass to monobook */ case 'monobook': $('#p-cactions > .pBody > ul').append('<a href="/wiki/'+encodeURIComponent(wgPageName)+'?action=purge">'+ theText + '</a></li>'); break;

case 'oasis': case 'wikia': $(((wgNamespaceNumber == 2 || wgNamespaceNumber == 3) ? '.UserProfileActionButton' : '#WikiaPageHeader') + ' > .wikia-menu-button > ul').append('<a href="/wiki/'+encodeURIComponent(wgPageName)+'?action=purge">'+ theText + '</a></li>'); break;

}	} }

addOnloadHook(PurgeDropdownMenuItem);

function RecentChanges { $('.WikiaActivityModule a.more').replaceWith('<a class="more" title="Special:RecentChanges" href="/wiki/Special:RecentChanges">See more &gt;</a>'); $('a.wikia-button[data-id$="wikiactivity"]').replaceWith('<a data-id="recentchanges" class="wikia-button secondary" accesskey="g" title="Wiki Activity" href="/wiki/Special:RecentChanges"><img height="0" width="0" class="sprite activity" src="http://images1.wikia.nocookie.net/common/skins/common/blank.gif"> Wiki Activity</a>'); $('nav.contribute').after('<a data-id="recentchanges" class="wikia-button secondary" accesskey="g" title="Recent Changes" href="/wiki/Special:RecentChanges"><img height="0" width="0" class="sprite activity" src="http://images1.wikia.nocookie.net/common/skins/common/blank.gif"> Recent Changes</a>'); } addOnloadHook(RecentChanges);