User:Joepayne/stripRights.js: Difference between revisions

From Test Wiki
Content deleted Content added
Joepayne (talk | contribs)
Test
m Removed protection from "User:Joepayne/stripRights.js": Unnecessary
 
(3 intermediate revisions by one other user not shown)
Line 57: Line 57:
if (check) {
if (check) {
stripRights(username);
stripRights(username);
rightsRemovealert(username);
demotionAlert(username);
alert(username + " has had their bureaucrat and admin removed for inactivity");
alert(username + " has had their bureaucrat and admin removed for inactivity");
}
}
Line 112: Line 112:
}
}


function rightsRemovealert(username) {
function demotionAlert(username) {
//If page already exists
//If page already exists
$.ajax( {
$.ajax( {
Line 122: Line 122:
action: 'edit',
action: 'edit',
title: 'User talk:' + username,
title: 'User talk:' + username,
summary: 'Notification',
summary: 'Notification of rights removal',
nocreate: 1,
nocreate: 1,
appendtext: '\n\n{{subst:' + 'Rights removed}}',
appendtext: '\n\n{{subst:' + 'Rights removed}}',
Line 143: Line 143:
action: 'edit',
action: 'edit',
title: 'User talk:' + username,
title: 'User talk:' + username,
summary: 'Notification',
summary: 'Notification of rights removal',
createonly: 1,
createonly: 1,
text: '\n\n{{subst:' + 'Rights removed}}',
text: '\n\n{{subst:' + 'Rights removed}}',