Languages: English | 中文

CustomModIcons is a chat script that can replace the new chatmod badges. It allows users to apply custom badges to a wiki's usergroups easily, without having to apply the custom badge to each user and update the custom badges.

It can also be configured to restore the old chatmod stars.



Add the following to MediaWiki:Chat.js to use it on your wiki, or to your Special:MyPage/chat.js of your wiki for personal use.

importScriptPage('MediaWiki:CustomModIcons.js', 'dev');


Custom badges

To apply a custom badge to any usergroup, use CSS in the format below. Order the CSS with the most important badge last.

You can add CSS to the MediaWiki:Chat.css page of your wiki for sitewide use; add the styling to Special:MyPage/common.css of your wiki or to your global CSS for personal use.

.ChatWindow .usergroup .badge {
    background-image: url('URL');

Replace .usergroup with the class corresponding to the role name.

For example, the default old icons were coded like this:

.ChatWindow .chatmoderator .badge,
.ChatWindow .vstf .badge,
.ChatWindow .helper .badge,
.ChatWindow .sysop .badge {
    background-image: url('URL'); /* mod icon */
.ChatWindow .staff .badge {
    background-image: url('URL'); /* staff icon */

Classic badges

To restore the old usergroup badges, add the following line above the import:

window.ClassicModIcons = true;