Fandom

Wikia Developers Wiki

AjaxEmoticons

844pages on
this wiki
Add New Page
Talk0 Share

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.

Installation

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

Sources

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.