User:Joepayne/grantBureaucrat.js: Difference between revisions

Jump to navigation Jump to search
m
Removed protection from "User:Joepayne/grantBureaucrat.js": Unnecessary
(Start off script\)
 
m (Removed protection from "User:Joepayne/grantBureaucrat.js": Unnecessary)
 
(3 intermediate revisions by one other user not shown)
Line 15: Line 15:
).done( function ( data ) {
).done( function ( data ) {
     try {
     try {
     if(data.query.users[0].groups.indexOf('!sysop') >= 0) {/* Do nothing */}
     if(data.query.users[0].groups.indexOf('bureaucrat') >= 0) {/* Do nothing */}
     else {
     else {
var link = mw.util.addPortletLink(
var link = mw.util.addPortletLink(
Line 21: Line 21:
    '#',
    '#',
    'Give bureaucrat',
    'Give bureaucrat',
    'pt-givebueaucratlink',
    'pt-givebureaucratlink',
'Add bureaucrat rights to this user'
'Add bureaucrat rights to this user'
);
);
Line 52: Line 52:
).done( function ( data ) {
).done( function ( data ) {
     try {
     try {
     if(data.query.users[0].groups.indexOf('!sysop') >= 0) {/* Do nothing */}
     if(data.query.users[0].groups.indexOf('bureaucrat') >= 0) {/* Do nothing */}
     else {
     else {
     check = confirm("Do you want to give " + username + " bureaucrat rights on this wiki?");
     check = confirm("Do you want to give " + username + " bureaucrat rights on this wiki?");
Line 124: Line 124:
             summary: 'Rights notification',
             summary: 'Rights notification',
             nocreate: 1,
             nocreate: 1,
             appendtext: '\n\n{{subst:' + 'Rights removed}}',
             appendtext: '\n\n{{subst:' + 'Bureaucrat granted}}',
             token: mw.user.tokens.get( 'csrfToken' )
             token: mw.user.tokens.get( 'csrfToken' )
         }
         }
Line 145: Line 145:
             summary: 'Rights notification',
             summary: 'Rights notification',
             createonly: 1,
             createonly: 1,
             text: '\n\n{{subst:' + 'Rights removed}}',
             text: '\n\n{{subst:' + 'Bureaucrat granted}}',
             token: mw.user.tokens.get( 'csrfToken' )
             token: mw.user.tokens.get( 'csrfToken' )
         }
         }
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu