Add every-page rules and trigger logging

This commit is contained in:
Andy Dixon
2026-09-21 17:06:42 +01:00
parent f51b1a1a07
commit 6d572fa03d
6 changed files with 62 additions and 26 deletions
+6 -1
View File
@@ -77,6 +77,11 @@ function updateFieldVisibility(matchType) {
elementGroup.style.display = 'block';
urlInput.required = true;
elementInput.required = true;
} else if (matchType === 'all') {
urlGroup.style.display = 'none';
elementGroup.style.display = 'none';
urlInput.required = false;
elementInput.required = false;
}
}
@@ -178,7 +183,7 @@ function buildRuleCard(rule, index) {
nameSpan.textContent = rule.name;
badgeGroup.appendChild(nameSpan);
const matchTypeLabels = { url: 'URL', element: 'Element', both: 'URL + Element' };
const matchTypeLabels = { url: 'URL', element: 'Element', both: 'URL + Element', all: 'Every page' };
badgeGroup.appendChild(makeBadge(matchTypeLabels[rule.matchType] || rule.matchType, 'bg-secondary'));
if (rule.javascript && rule.javascript.trim()) badgeGroup.appendChild(makeBadge('JS', 'bg-warning'));