FANDOM


IsTyping displays which users are typing on chat. This also affects private messages.

Installing

Add this on your wiki's MediaWiki:Chat.js:

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

Configuration

CSS

The typing indicator is identified by the typing-indicator class, and when it's visible, the is-typing class is added to the body element.

JavaScript

All configuration options are stored in the window.IsTyping object. All configuration options shown below are completely optional, and the script will work just as fine without them.

$indicator
Indicator element to use instead of one inserted by the script, allows for customizing the placement of the indicator. Type: jQuery.fn
noStyle
Whether the script will add default styles or not. Default: false
doScroll
The chat window is scrolled by 20px to compensate for the indicator jiggling, this can be not desired if you're repositioning it with IsTyping.$indicator. Default: true
mainRoomDisabled
Whether the typing indicator should be disabled on the main chat room. Default: false
privateRoomDisabled
Whether the typing indicator should be disabled on private chat rooms. Default: false
filterSelf
Whether the user should be excluded from the typing indicator list. This could be useful for seeing when others can see you typing, but you may not want this to be set to false site-wide. Default: true

Example

Example configuration which repositions the indicator to the bottom of the window with reduced font size, and disables the indicator on the main chat window.

JS

window.IsTyping = {
    $indicator: $('<div>', {
        class: 'typing-indicator'
    }).appendTo('body'),
    noStyle: true,
    doScroll: false,
    mainRoomDisabled: true
}

CSS

#WikiaPage {
    margin-bottom: 4px;
}
.typing-indicator {
    position: absolute;
    bottom: 2px;
    left: 2em;
    right: 2em;
    font-size: 10px;
}
.typing-indicator .username {
    font-weight: bold;
}

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.