Fandom

Wikia Developers Wiki

ChatDelay

915pages on
this wiki
Add New Page
Talk0 Share

ChatDelay is a chat scripts that prevents users from sending long messages over a very short time, such as flood messages by spammers.

Functionality

Whenever sending a message, the scripts disables sending further messages for a specific period of time. A progress bar below your avatar displays the remaining time.

If the sent message contains 10 characters or less, the delay before being able to send another message would be 1 second. For longer messages, the timer's duration is calculated logarithmically, based on how long the message is.

Even though users can't send messages while the timer is set, they are still able to type new messages- in order not to cause any inconvenience for everyday chatting- and will be able to send them as soon as the time ends.

Installation

For a site-wide effect, add the following to MediaWiki:Chat.js in your wiki. For a personal use, add it to Special:MyPage/chat.js:

importArticles({
	type: "script",
	articles: [
		"u:dev:ChatDelay/code.js"
	]
});

Customization

There are 2 ways to customize the script:

  1. Customize the maximum waiting time.
  2. Enable this feature in private messages (by default, it only affects main chat).

Customization is done by adding the following code before the script's import function (see the table for explanation):

window.dev = window.dev || {};
window.dev.chatdelay = {
	max: 10,
	mainOnly: false
};
Property Role Values Default value
max The maximum waiting time Any number between 3 and 10 (including) 4
mainOnly Whether or not to restrict the script to main chat false or true true

Versions

  • July 6, 2015- official release.

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.