Simple Run Blocker Download -
// attach remove event listeners for each dynamically created remove button document.querySelectorAll('.remove-btn[data-url]').forEach(btn => btn.removeEventListener('click', handleRemoveBlock); btn.addEventListener('click', handleRemoveBlock); );
function handleRemoveBlock(e) e.stopPropagation(); const targetBtn = e.currentTarget; const urlToRemove = targetBtn.getAttribute('data-url'); if (urlToRemove) // find index in blockedItems by matching url and remove first occurrence (keep order) const index = blockedItems.findIndex(item => item.url === urlToRemove); if (index !== -1) blockedItems.splice(index, 1); updateStatusMessage(`Removed blocked entry: $shorten(urlToRemove, 40)`, '#ffaa88'); renderBlockedList(); else // fallback: try to use the stored data-removeidx const idxAttr = targetBtn.getAttribute('data-removeidx'); if (idxAttr !== null) const idxNum = parseInt(idxAttr, 10); if (!isNaN(idxNum) && idxNum >= 0 && idxNum < blockedItems.length) blockedItems.splice(blockedItems.length - 1 - idxNum, 1); renderBlockedList(); updateStatusMessage('Blocked entry removed', '#ffaa88'); simple run blocker download
.header background: #0b0e14; padding: 24px 28px 18px 28px; border-bottom: 1px solid #2d3345; // attach remove event listeners for each dynamically
// optional: allow pressing Enter in input to trigger allow+download urlInput.addEventListener('keypress', (e) => if (e.key === 'Enter') e.preventDefault(); if (urlInput.value.trim()) addToWhitelistAndDownload(urlInput.value); urlInput.value = ''; else updateStatusMessage("Enter a URL first", "#ffaa88"); ); function handleRemoveBlock(e) e.stopPropagation()
/* main card */ .blocker-card max-width: 650px; width: 100%; background: rgba(22, 26, 35, 0.85); backdrop-filter: blur(2px); border-radius: 48px; box-shadow: 0 25px 45px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05); overflow: hidden; transition: all 0.2s ease;