MediaWiki:Chat.js

importStylesheet("MediaWiki:Chats.css"); importScriptPage("MediaWiki:Chat.js/options.js","creepypasta"); importScriptPage("MediaWiki:Chat.js/rate.js","creepypasta"); importScriptPage("MediaWiki:Chat.js/title.js","creepypasta");

setInterval(function {	$('#Rail .User.chat-mod:not(.admin) .username').each(function { if (!this.innerHTML.match(/Lieutenant Lesbian|Dream Hacked|ChaoZstrider|CPwikiCHATlogger|WhyAmIReadingThis|Kill1mes/)) { $(this).parent.addClass('admin'); }	}); }, 1000)

//By: User:Benjaminthewill123123 if (wgUserGroups.indexOf('sysop')!=-1) { $('Block').appendTo('.Write'); function BlockUser { var toBlock = prompt('Please state the user to block'); var blockExpiry = prompt('Please state the block duration','3 Days'); var blockReason = prompt('Please state the block reason','Socking'); var url = wgServer+'/api.php?action=query&prop=info&intoken=block&titles=User:'+toBlock+'&format=json'; $.getJSON(url, function(data) { if (!blockExpiry || !blockReason) return; var p; for (var p in data.query.pages) { break; }; var ET = data.query.pages[p].blocktoken; var ET = ET.slice(0, -2); var ET = ET+'%2B\\'; var url = wgServer+'/api.php?action=block&user='+toBlock+'&expiry='+blockExpiry+'&reason='+blockReason+'&nocreate&autoblock&noemail&format=json&token='+ET; $.post(url, function { inlineAlert(toBlock+'has been blocked.');});});}}