MediaWiki:Chat.js

// The following code is needed to mark bureaucrats and admins from chatmoderators in special:chat // The following code is to be inserted to your wiki's Chat.js // Mark admins and bureaucrats setInterval(function{   "use strict";    $('.User.chat-mod .username').each(function  { if (this.innerHTML.match(/HurricanePatricia2015|Hurricane Layten|Bobnekaro|HurricaneOdile|Sassmaster15|StrawberryMaster/)) { $(this).parent.addClass('admin').removeClass('chat-mod'); }       if (this.innerHTML.match(/Hypercane/)) { $(this).parent.addClass('bureaucrat').removeClass('chat-mod'); }       if (this.innerHTML.match(/AGirlCalledKeranique|A Bittersweet Journey/)) { $(this).parent.addClass('junioradmin').removeClass('chat-mod'); }                if (this.innerHTML.match(/HypotheticalHurricane|DarrenDude/)) { $(this).parent.addClass('rollback').removeClass('chat-mod'); }                if (this.innerHTML.match(/Hypercane Bot|PassionFruitMaster/)) { $(this).parent.addClass('bot').removeClass('chat-mod'); }         }); }, 1);

var chatags = { images: true };

chatAnnouncementsAll = true;

importArticles({   type: 'script',    articles: [        // ...        'u:dev:MediaWiki:ChatAnnouncements/code.js',        'u:dev:MediaWiki:ChatOptions/code.js',        'u:shining-armor:MediaWiki:ChatTags/code.js',        'MediaWiki:Chat.js/inline.js'        // ...    ] });

// All credit goes to Penguin-Pal // $(function {	var gap = 30,		chatResizeEmoticons = $('');	$(chatResizeEmoticons).appendTo("head");	function request {		$.getJSON("/api.php?action=query&format=json&prop=revisions&titles=MediaWiki:Emoticons|MediaWiki:ChatResizeEmoticons.css&rvprop=content&cb=" + new Date.getTime, function(data) { var a = data.query.pages, content = {emoticons: [], css: ""}; for (var pageid in a) { if (a[pageid].title == "MediaWiki:ChatResizeEmoticons.css") { $(chatResizeEmoticons).html(a[pageid].revisions[0]["*"]); } else { content.emoticons.push(a[pageid].revisions[0]["*"]); }			}			mw.config.set("EMOTICONS", content.emoticons.join("\n\n")); });	}	// make first request when joining the room	request;	// request again every every 'gap' seconds	setInterval(request, gap * 1000); });