MediaWiki:AddNukeLink.js

/* AddNukeLink by Sophiedp */ (function {    if (!document.body.classList.contains('mw-special-Contributions') || window.AddNukeLinkLoaded) {        return;    }    window.AddNukeLinkLoaded = true;    new mw.Api.get({ action: 'query', meta: 'userinfo', uiprop: 'rights', format: 'json' }).done(function (d) { if (d && d.query && d.query.userinfo && d.query.userinfo.rights && /nuke/.test(d.query.userinfo.rights)) { var link = document.querySelector('#contentSub > a:last-child'); var user = document.querySelector('.UserProfileMasthead .masthead-info h1').textContent; var el = ' | nuke'; link.insertAdjacentHTML('afterend', el); }   }) });