3,217
edits
MacFan4000 (talk | contribs) (Created page with "//Script to add sysop to a user on one click //To do: add toggles for different skins if( mw.config.get("wgRelevantUserName") ) { var username = mw.config.get("wgRelevantUser...") |
m (Removed protection from "User:MacFan4000/grantAdmin.js": Unnecessary.) |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 18: | Line 18: | ||
else { | else { | ||
var link = mw.util.addPortletLink( | var link = mw.util.addPortletLink( | ||
' | 'sidebar', | ||
'#', | '#', | ||
'Grant Admin', | 'Grant Admin', | ||
'pt-grantadminlink', | 'pt-grantadminlink', | ||
'Grant admin | 'Grant admin privileges to this user' | ||
); | ); | ||
Line 54: | Line 54: | ||
if(data.query.users[0].groups.indexOf('sysop') >= 0) {/* Do nothing */} | if(data.query.users[0].groups.indexOf('sysop') >= 0) {/* Do nothing */} | ||
else { | else { | ||
check = confirm("Do you want to give " + username + " administrator | check = confirm("Do you want to give " + username + " administrator privileges on this wiki?"); | ||
if (check) { | if (check) { | ||
grantAdmin(username); | grantAdmin(username); |