Content deleted Content added
Polygnotus (talk | contribs) No edit summary Tag: Reverted |
Polygnotus (talk | contribs) Undid revision 1296697469 by Polygnotus (talk) |
||
Line 6:
// Show input dialog immediately
showInputDialog();
}
// Helper function to scroll status area to bottom
function scrollStatusToBottom() {
const statusDiv = $('#status-text');
requestAnimationFrame(() => {
statusDiv.scrollTop(statusDiv[0].scrollHeight);▼
}
Line 21 ⟶ 29:
<textarea id="user-input" style="width: 100%; height: 200px; font-family: monospace;"
placeholder="Paste your usernames here..."></textarea>
<div id="status-area" style="margin-top: 10px; font-family: monospace; background: #f8f9fa; padding: 10px; border: 1px solid #ddd; height:
<div id="status-text"></div>
</div>
Line 30 ⟶ 38:
title: 'User Block Checker',
width: 600,
height:
modal: false,
resizable: true,
Line 69 ⟶ 77:
const statusDiv = $('#status-text');
statusDiv.html(`<div>Checking ${users.length} users for blocks and activity (last 12 months)...</div>`);
scrollStatusToBottom();
console.log(`Checking ${users.length} users for blocks and activity...`);
Line 78 ⟶ 87:
// Disable the Check Users button during processing
const checkButton = dialog.parent().find('.ui-dialog-buttonset button:contains("Check Users")');
for (let i = 0; i < users.length; i++) {
Line 86 ⟶ 94:
statusDiv.append(`<div>${progress} Checking ${userInfo.username}...</div>`);
scrollStatusToBottom();
▲ statusDiv.scrollTop(statusDiv[0].scrollHeight);
console.log(`${progress} Checking user: ${userInfo.username} ...`);
Line 98 ⟶ 105:
blockedUsers.push(userInfo.original);
statusDiv.append(`<div style="color: #d33;">${progress} ✗ ${userInfo.username} is blocked</div>`);
console.log(`✗ ${userInfo.username} is blocked`);
} else {
Line 108 ⟶ 114:
activeUsers.push(userInfo.original);
statusDiv.append(`<div style="color: #00af89;">${progress} ✓ ${userInfo.username} is active (not blocked + active in last 12 months)</div>`);
console.log(`✓ ${userInfo.username} is active (not blocked + active in last 12 months)`);
} else {
inactiveUsers.push(userInfo.original);
statusDiv.append(`<div style="color: #fc3;">${progress} ⚠ ${userInfo.username} is not blocked but inactive (no edits in last 12 months)</div>`);
console.log(`⚠ ${userInfo.username} is not blocked but inactive (no edits in last 12 months)`);
}
Line 124 ⟶ 128:
activeUsers.push(userInfo.original);
statusDiv.append(`<div style="color: #fc3;">${progress} ? ${userInfo.username} - check failed, assuming active</div>`);
scrollStatusToBottom();
console.log(`? ${userInfo.username} - check failed, assuming active`);
}
// Add base delay between requests to avoid hammering the API
Line 138 ⟶ 139:
// Re-enable button and show completion
checkButton.prop('disabled', false).text('Check Users'
statusDiv.append(`<div style="font-weight: bold; margin-top: 10px;">✓ Completed! ${activeUsers.length} active, ${blockedUsers.length} blocked, ${inactiveUsers.length} inactive</div>`);
scrollStatusToBottom();
// Display results
|