User:Euphoria/massBlock.js: Difference between revisions
From Test Wiki
Content deleted Content added
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
if (mw.config.get('wgUserGroups').includes('sysop')) { |
if (mw.config.get('wgUserGroups').includes('sysop')) { |
||
// Function to create the blocking interface as if it's a "Special Page" |
// Function to create the blocking interface as if it's a "Special Page" |
||
function createBlockingInterface() { |
function createBlockingInterface() { |
||
| Line 6: | Line 5: | ||
contentText.empty(); // Clear the current content |
contentText.empty(); // Clear the current content |
||
// Change the document title |
|||
| ⚫ | |||
document.title = 'Mass Block Tool - ' + mw.config.get('wgSiteName'); |
|||
// Update the header of the content area |
|||
contentText.append('<h1>Mass Block Tool</h1>'); |
|||
| ⚫ | |||
'<p>If you abuse this tool, it\'s your fault, not mine.</p>' + |
'<p>If you abuse this tool, it\'s your fault, not mine.</p>' + |
||
'<textarea id="usernamesToBlock" placeholder="Usernames to block (one on each line, please):" rows="10" cols="50"></textarea>' + |
'<textarea id="usernamesToBlock" placeholder="Usernames to block (one on each line, please):" rows="10" cols="50"></textarea>' + |
||
| Line 40: | Line 44: | ||
'</div>'; |
'</div>'; |
||
contentText. |
contentText.append(formHtml); |
||
$('#blockReasonSelect').change(function() { |
$('#blockReasonSelect').change(function() { |
||