User:Magiczocker/common.js

if (mw.config.get('wgCanonicalSpecialPageName') !== 'Userrights') return;
 * (function(mw) {

const reasonTable = document.getElementById('mw-userrights-table-outer'); const reason = document.getElementById('wpReason'); const cell = reasonTable.rows[0].insertCell(2);

function addButton(label, text) { const button = document.createElement('button'); button.type = 'button'; button.textContent = label; button.style.marginRight = '4px'; button.addEventListener('click', function {			reason.value = text;		}); cell.appendChild(button); }

addButton('Administrator', 'Promoting to administrator per discussion at '); addButton('Autopatrol',   'Trusted, constructive, and active user, no need to patrol'); addButton('Bureaucrat',   'Promoting to bureaucrat per discussion at '); addButton('Directors',    'Admin on mcw-'); })(window.mediaWiki);