WordFilter is a script that displays an inline alert to any user who attempts to post a blocked word into main chat. The user can then choose to continue to post the message, or choose to cancel.


Ensure that the custom chat JavaScript and CSS is set up, and then add the following to your wiki's MediaWiki:Chat.js:

window.badWords = ['BADWORD', 'ANOTHERBADWORD']; // add bad words to pre-generated list
Using configuration options with FANDOM Open Source Library scripts
The instructions on this page describe how to use configuration options with a script. Here on the FANDOM Open Source Library, many scripts provide optional configuration settings as a mean to alter or enhance the default behavior of the script. When installing configuration options in your JavaScript file, please note that they need to go above the import statement in order to work — unless the directions say otherwise. In case MediaWiki:ImportJS is used to load the scripts, it will be executed last.
Configuration options load too late, don't work
Proper placement of configuration options
// 1. AjaxRC import statement
// 2. AjaxRC configuration option
var ajaxRefresh = 30000;
// 1. AjaxRC configuration option
var ajaxRefresh = 30000;
// 2. AjaxRC import statement


  • The inline alert will be displayed once per chat room, including private messages. This can also be used to duplicate messages.