MediaWiki:Chat.js

$(function {   console.log("Mediawiki loaded"); }); /* var bureaucrats = [ "Mooziq", "Xytl" ]; var admins = [ "Amberstone", "Punkdrummergirl", "AutoModerator" ]; var custodians = [ "Mad1303", "Star101988" ]; var mods = [ "Lunifer", "Pikalil", "Darkmuddkip", "7W337Y" ]; var usergroups = [bureaucrats, admins, custodians, mods]; var style = ""; $(function {   for (i = 0; i < usergroups.length; i++) {        for (j = 0; j < usergroups[i].length; j++) {            switch( i ) {                case 0:                    style += "[data-user='" + usergroups[i][j] + "'] .username {color: #CD0000 !important; font-weight: bold;} ";                    style+= ".Chat [data-user='" + usergroups[i][j] + "'] .username:after {content: '[Bureaucrat]'; margin-left:1em} ";                    break;                case 1:                    style += "[data-user='" + usergroups[i][j] + "'] .username {color: #800080 !important; font-weight: bold;} ";                    style += ".Chat [data-user='" + usergroups[i][j] + "'] .username:after {content: '[Admin]'; margin-left:1em} ";                    break;                case 2:                    style += "[data-user='" + usergroups[i][j] + "'] .username {color: #228C77 !important; font-weight: bold;} "; style += ".Chat [data-user='" + usergroups[i][j] + "'] .username:after {content: '[Custodian]; margin-left:1em'} "; break; case 3: style += "[data-user='" + usergroups[i][j] + "'] .username {color: #1874CD !important; font-weight: bold;} "; style += ".Chat [data-user='" + usergroups[i][j] + "'] .username:after {content: '[Moderator]'; margin-left:1em} "; break; default: console.log("Default"); }       }    }    style += " "; $('head').append(style); console.log("Done! (v1.6)"); });