Fandom Developers Wiki
Advertisement

wgMessageWallsExist extends the mw.config variable to add a new wgVariable called wgMessageWallsExist. This method, unlike the others, does not return a usable value but instead returns a promise which you can use to separate logic for message walls and talk pages.

Usage

To import and use this script please make sure it is included before the script that uses it so that it is loaded in time to be used.

importArticles({
    type: 'script',
    articles: [
        'u:dev:wgMessageWallsExist.js',
        // Scripts that depend on it
    ]
});

To use do as follows

mw.config.get('wgMessageWallsExist').then(
    function () {
        // Message walls do exist on this wiki
    },
    function () {
        // Message walls do not exist on this wiki
    }
);
Advertisement