User:MacFan4000/grantAdmin.js: Difference between revisions

Jump to navigation Jump to search
m
Removed protection from "User:MacFan4000/grantAdmin.js": Unnecessary.
(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(
    'p-cactions',
    'sidebar',
    '#',
    '#',
    '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);
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu