User:Eladkse/global.js

importScriptPage('MediaWiki:Search.js', 'eladkse');

function UserDropdownMenuItems { $('#AccountNavigation ul.subnav li:first-child').after('My blogMy contributions'); }

addOnloadHook(UserDropdownMenuItems);

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(''+ theText + ''); break;

case 'oasis': case 'wikia': $(((wgNamespaceNumber == 2 || wgNamespaceNumber == 3) ? '.UserProfileActionButton' : '#WikiaPageHeader') + ' > .wikia-menu-button > ul').append(''+ theText + ''); 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').replaceWith('<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);