User:MacFan4000/grantAdmin.js: Difference between revisions

From Test Wiki
Content deleted Content added
HeartsDo (talk | contribs)
m Removed protection from "User:MacFan4000/grantAdmin.js"
Amos (talk | contribs)
m Removed protection from "User:MacFan4000/grantAdmin.js": Unnecessary.
 
(3 intermediate revisions by 2 users not shown)
Line 22: Line 22:
'Grant Admin',
'Grant Admin',
'pt-grantadminlink',
'pt-grantadminlink',
'Grant admin privleges to this user'
'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 privleges on this wiki?");
check = confirm("Do you want to give " + username + " administrator privileges on this wiki?");
if (check) {
if (check) {
grantAdmin(username);
grantAdmin(username);