MediaWiki:Common.js/UserGroupMessages.js

/* Any JavaScript here will be loaded for all users on every page load. */ // From User:Monchoman45 function UserGroupMessages { //if the whole thing is null, it's an anon if(wgUserGroups == null) {$('.anonmessage').css('display', 'inline');return;} //otherwise it's an array for(var i in wgUserGroups) { switch(wgUserGroups[i]) { case 'staff': case 'helper': case 'vstf': case 'bureaucrat': $('.cratmessage').css('display', 'inline'); case 'sysop': $('.adminmessage').css('display', 'inline'); break; case 'autoconfirmed': $('.autoconfmessage').css('display', 'inline'); break; }	} } addOnloadHook(UserGroupMessages);