User:Mario&LuigiBowser'sInsideStory/global.js

// chat count script

$('.Rail .public').after('Chat count '); function seeChatCount{ var count = mainRoom.model.users.length; var includeMe = false; if (includeMe === false){ count = mainRoom.model.users.length - 1; }   else if (includeMe === true || undefined){ count; }   if (count === 1 ){ $.showCustomModal('Chat count', 'There is only 1 user online.'); }   else if (count !== 1 && count !== 0){ $.showCustomModal('Chat count', 'There is currently ' + count + ' users online!'); }   else if (count === 0){ $.showCustomModal('Chat count', 'Nobody is here.'); } } // chat block defaults var chatBlockReason = "Sockpuppetry"; var chatBlockExpiry = "infinite"; // AjaxRC window.ajaxSpecialPages = ["Recentchanges", "WikiActivity"]; window.ajaxIndicator = 'http://images2.wikia.nocookie.net/__cb20100609110347/software/images/a/a9/Indicator.gif'; window.ajaxRefresh = 60000; window.AjaxRCRefreshText = 'Auto-refresh'; // create userpage $(function {   $('.toolbar .tools').append('Create userpage');   $('a.createUserPage').click(function { $.ajax({           type: 'POST',            url: mw.util.wikiScript('api'),            dataType: 'json',            data: {                action: 'edit',                title: 'User:Mario&LuigiBowser\'sInsideStory',                text: '',                summary: 'Creating userpage (script)',                minor: true,                format: 'json',                token: mw.user.tokens.get('editToken')            }        }).done(function (data){            if (data.edit.result === 'Success') {                new BannerNotification("Userpage has been successfully created!","confirm").show;            } else {                new BannerNotification("An error occurred while creating userpage","error").show;            }        }).fail(function (data) {            new BannerNotification("An error occurred while creating userpage","error").show;        }); }); }); // Import importArticles({   type: "script",    articles: [      'u:gumballfanonrandomness:MediaWiki:Chat.js',      'u:dev:MediaWiki:FindAndReplace/code.js',      'u:dev:MediaWiki:MessageBlocker/code.js',      'u:dev:ChatOptions/code.js',      'u:dev:ChatDelay/code.js',      'u:dev:NewMessageCount.js',      'u:dev:MediaWiki:PrivateMessageAlert/code.js',      'u:dev:MediaWiki:ChatHacks.js',      'u:dev:MediaWiki:ChatBlockButton/code.js',      'u:dev:MediaWiki:AjaxRC/code.js'    ] });