FANDOM


RefreshThreads periodically checks for new thread replies using AJAX.

Installation

Importing multiple scripts? This quick guide shows how to combine the imports.
  • For site-wide use, an administrator can add the line below to the wiki's MediaWiki:ImportJS page.
dev:RefreshThreads/code.js
  • For personal use, add the code snippet below to your global.js page (for use on all wikis) or your common.js page on your wiki (for use on a single wiki). Note that personal JS must be enabled for your account.
importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:RefreshThreads/code.js',
    ]
});

Configuration

All configuration variables are stored in the window.RefreshThreads object.

interval
Time between AJAX requests (in ms). Default: 15000
auto_add
If set to true, new replies will be added automatically instead of a button appearing prompting the user to update manually. Default: false

Example configuration:

window.RefreshThreads = {
    interval: 30000,
    auto_add: true
};
// importArticles...
Community content is available under CC-BY-SA unless otherwise noted.