// Clear entire whitelist (reset) function clearWhitelist() const count = whitelist.size; whitelist.clear(); updateStatusMessage(`🧹 Cleared $count whitelisted URL(s). All downloads will be blocked now.`, "#ffbc7a"); // optional: add a system entry to blocked list? maybe not, but we keep blocked list intact if (count > 0) const notify = document.createElement('div'); renderBlockedList(); // just refresh display (blocked items remain)
.download-note background: #1e2335; border-radius: 20px; padding: 12px 18px; margin-top: 24px; font-size: 0.75rem; color: #9aa2c2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
clearAllBtn.addEventListener('click', () => if (whitelist.size > 0) clearWhitelist(); else updateStatusMessage("Whitelist already empty. Run blocker blocks everything.", "#ffcc88"); );
.blocked-list li background: #131825; margin: 8px 12px; padding: 10px 16px; border-radius: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-left: 4px solid #ff6b6b; font-size: 0.85rem; font-family: monospace; word-break: break-all; simple run blocker download
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <title>Simple Run Blocker · Download Manager</title> <style> * box-sizing: border-box; user-select: none; /* prevents accidental text selection on buttons, but keeps text readable */
.btn-primary background: #3c4bff; color: white; box-shadow: 0 4px 12px #3c4bff40;
.info-panel .rule font-family: 'Fira Code', monospace; background: #00000060; padding: 6px 12px; border-radius: 40px; font-size: 0.85rem; color: #ffdf9c; letter-spacing: 0.3px; Run blocker blocks everything
.info-panel p margin: 0 0 8px 0; color: #cbd5ff; font-weight: 500; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
.blocked-list list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto;
blockDemoBtn.addEventListener('click', () => simulateBlockedRun(); ); // Preload some examples for demonstration (but not
/* content */ .content padding: 28px 28px 32px;
// add demo default entries? maybe show informative example? but not needed. // Preload some examples for demonstration (but not whitelist, just illustrative) function loadDemoExamples() // add one informational note in blocked list to show concept? but not required, but for better UX: if (blockedItems.length === 0) addBlockedEntry("example.com/suspicious_script.bat (demo)", "Simulated blocked payload"); addBlockedEntry("https://malware.test/runner.exe", "Auto-blocked by run blocker policy"); renderBlockedList(); // add a dummy whitelist entry as example? no, whitelist starts empty to enforce strict run blocking. updateStatusMessage("⛔ Run Blocker ACTIVE — add URLs to whitelist first", "#ffdb8e");
function updateStatusMessage(msg, color = '#b5ff9e') if (statusSpan) statusSpan.textContent = msg; statusSpan.style.color = color; setTimeout(() => if (statusSpan.textContent === msg) statusSpan.style.color = '#87e987'; statusSpan.textContent = '✅ ready'; , 2800);