VOOZH about

URL: https://minecraft.wiki/w/MediaWiki:Group-bureaucrat.js

⇱ MediaWiki:Group-bureaucrat.js – Minecraft Wiki


MediaWiki:Group-bureaucrat.js

From Minecraft Wiki
Jump to navigation Jump to search
In other languages

Note: After saving, you have to bypass your browser's cache to see the changes.

Google Chrome, Firefox, Microsoft Edge, and Safari: Hold down the key and click the Reload toolbar button.
For details and instructions about other browsers, see Wikipedia:Bypass your cache.

/* Any JavaScript here will be loaded for bureaucrats only */
(function(mw){
'use strict';
if(mw.config.get('wgCanonicalSpecialPageName')!=='Userrights')return;
varreason;
functionaddButton(label,text){
varbutton=document.createElement('button');
button.type='button';
button.textContent=label;
button.style.marginRight='4px';
button.addEventListener('click',function(){
reason.value=text;
});
returnbutton;
}
mw.hook('wikipage.content').add(function($content){
if(reason)return;
varreasonTable=$content.find('#mw-userrights-table-outer')[0];
if(!reasonTable)return;
reason=$content.find('#wpReason')[0];
varcell=reasonTable.rows[0].insertCell(2);
cell.append(
addButton('Administrator','Promoting to administrator per discussion at <LINK>'),
addButton('Autopatrol','Trusted, constructive, and active user, no need to patrol'),
addButton('Bureaucrat','Promoting to bureaucrat per discussion at <LINK>'),
addButton('Directors','Admin on mcw-<LANG>')
);
});
})(window.mediaWiki);
Retrieved from "https://minecraft.wiki/w/MediaWiki:Group-bureaucrat.js?oldid=2379581"

Navigation menu