ChatObject is a script that creates a global object allowing for easier customization of Chat, such as adding action buttons and adjusting colors.


Most of the chat customization scripts are spread across FANDOM and written by various authors. They may be out-of-date, poorly documented, are polymorphic, and generally aren't aware of each other. This script aims to provide the functionality offered by them in one place, where it can be viewed and edited by many. See #Contributing about how you can help.


Assuming you already have imported custom Javascript into your chat (if not, check out steps 1, 2, and 3, authored by Sactage), place the following into MediaWiki:Chat.js:

importScriptPage( 'ChatObject/code.js', 'dev' );



The methods of the Chat object are documented extensively in the source code. You can simply call them in MediaWiki:Chat.js like:

// An example color scheme change
chatBackground: 'green',
pageBackground: 'black',
textColor: 'pink'


You can easily extend the Chat object in MediaWiki:Chat.js with your own methods and properties:

Chat.helloWorld = function () {
console.log( 'Hello World!' );
Chat.myProperty = 'Hello World!';


If you have created a particularly useful addition, please be so kind and post it on the talk page so that it can be implemented into core functionality for the benefit of others. Feel compelled to leave any feature requests and bug reports as well!