User:Joepayne/grantBureaucrat.js: Difference between revisions

From Test Wiki
Test fix
m (Protected "User:Joepayne/grantBureaucrat.js": Security ([Edit=Allow only bureaucrats] (indefinite) [Move=Allow only bureaucrats] (indefinite) [Delete=Allow only bureaucrats] (indefinite) [Protect=Allow only bureaucrats] (indefinite)))
(Test fix)
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?");
126

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.