Whenever a change in emoticons triggers or emoticons file URLs in MediaWiki:Emoticons is done, you need to refresh chat for viewing its updated version. AjaxEmoticons allows you to get an updated version for the emoticons without refreshing chat.


First of all, for wiki use, you need to install the custom chat JavaScript and CSS in your wiki.
Then import the feature

Select your personal JavaScript page that you prefer, and paste in:

importScriptPage('MediaWiki:AjaxEmoticons/code.js', 'dev');

Pages for Inserting the Script

Page Affecting Notice
w:Special:MyPage/global.js Personal use - all wikis
Special:MyPage/chat.js Personal use - current wiki Personal JS and CSS pages must be imported
MediaWiki:Chat.js Wiki-wide use - current wiki

Customize Emoticons Request Frequency

By default, your browser would request an updated version of MediaWiki:Emoticons every 30 seconds. In order to use another custom time, add the following line before the importScriptPage:

ajaxEmoticonsInterval = someNumber;

And instead of someNumber, insert a number that represents the time gap between each request (in milliseconds. e.g. 1000 equals 1 second).
On this example, the feat is imported and the time gap between each update is 45 seconds:

ajaxEmoticonsInterval = 45000;
importScriptPage('MediaWiki:AjaxEmoticons/code.js', 'dev');

Special thanks