diff --git a/index.html b/index.html index 242bb32..0d7df23 100644 --- a/index.html +++ b/index.html @@ -72,6 +72,7 @@ Min score + Tylko słownikowe Sortuj po score @@ -196,11 +197,18 @@ function applyFiltersAndSort(){ const sortBy = document.getElementById('sortBy').value; const sortDir = document.getElementById('sortDir').value; + const onlyDictionary = document.getElementById('onlyDictionary').checked; + let arr = (domains || []).filter(d => { if (decision === 'none' && d.decision) return false; if (decision && decision !== 'none' && (d.decision || '') !== decision) return false; if (status && (d.status || 'available') !== status) return false; if (minScore !== null && Number(d.score || 0) < minScore) return false; + if (onlyDictionary) { + const kw = Array.isArray(d.keywords) ? d.keywords.map(x => String(x).toLowerCase()) : []; + const isDict = kw.includes('brand') && kw.includes('short') && kw.includes('dictionary'); + if (!isDict) return false; + } return true; }); @@ -310,6 +318,7 @@ document.getElementById('onlyNew').addEventListener('change', async()=>{await lo document.getElementById('decisionFilter').addEventListener('change', renderRows); document.getElementById('statusFilter').addEventListener('change', renderRows); document.getElementById('minScore').addEventListener('input', renderRows); +document.getElementById('onlyDictionary').addEventListener('change', renderRows); document.getElementById('sortBy').addEventListener('change', renderRows); document.getElementById('sortDir').addEventListener('change', renderRows); document.querySelectorAll('th.sortable').forEach(th=>{