diff --git a/entrypoints/background.ts b/entrypoints/background.ts index 6f927bb..2e85dbf 100644 --- a/entrypoints/background.ts +++ b/entrypoints/background.ts @@ -56,6 +56,7 @@ async function refreshToolbarIconForTab( treatDnsResolutionErrorsAsFailure: settings.treatDnsResolutionErrorsAsFailure, dnsProvider: settings.dnsProvider, + customDkimSelectors: settings.customDkimSelectors, }); if (toolbarRefreshGenByTabId.get(tabId) !== token) { return; diff --git a/entrypoints/popup/main.ts b/entrypoints/popup/main.ts index 47ed131..5ddafcb 100644 --- a/entrypoints/popup/main.ts +++ b/entrypoints/popup/main.ts @@ -38,6 +38,9 @@ let settings: ExtensionSettings = { ...DEFAULT_SETTINGS }; let currentView: 'welcome' | 'main' | 'settings' = 'main'; let lastMode: CheckMode = 'apex'; let lastResult: CheckResult | null = null; +let compareResult: CheckResult | null = null; +let lastResultUpdatesToolbar = true; +let compareRequestId = 0; const COG_SVG = ``; @@ -100,6 +103,11 @@ function statusLabel(status: HealthStatus): string { } } +function gradeStatusLabel(status: GradeLine['status']): string { + if (status === 'info') return 'Info'; + return statusLabel(status); +} + function truncate(s: string, max: number): string { const t = s.trim(); if (t.length <= max) return t; @@ -117,7 +125,7 @@ function mxtoolboxEmailHealthUrl(domain: string): string { } const DNS_TECHNIQUE_DISCLOSURE = - 'DNS queries use DNS-over-HTTPS (Cloudflare / Google). Entra probe uses HTTPS only; no MTA-STS policy files or cert inspection. DKIM probes _domainkey for null DKIM, then provider/common selectors, then *._domainkey.'; + 'DNS queries use DNS-over-HTTPS (Cloudflare / Google). Entra probe uses HTTPS only; no MTA-STS policy files or cert inspection. DKIM probes _domainkey for null DKIM, then configured/provider/common selectors, then *._domainkey.'; /** Opens a URL from a user gesture (e.g. modal submit) without extra extension permissions. */ function openUrlInNewTab(url: string): void { @@ -135,6 +143,11 @@ function hasReportableDmarcIssue(result: CheckResult): boolean { } function renderResultFooterActions(result: CheckResult): string { + const rootTargets = resolveCheckTargets(result.tabHostname, 'apex'); + const showCompare = rootTargets.queryHost !== rootTargets.tab; + const compareBtn = showCompare + ? `Compare root/tab` + : ''; const showCastShame = hasReportableDmarcIssue(result); const castShameBtn = showCastShame ? `Report DMARC issue` @@ -142,6 +155,8 @@ function renderResultFooterActions(result: CheckResult): string { return `
${escapeHtml(guidance)}
First run
${escapeHtml(loadingLabel(mode, tabHostname))}
${escapeHtml(loadingLabel(mode, hostname))}
Querying public DNS (DoH)…
${escapeHtml(message)}
SPF + DMARC + DKIM (max 10)