()
| 3909 | wifiRender(); |
| 3910 | } |
| 3911 | |
| 3912 | function wifiFsFilterSsid(ssidEnc) { |
| 3913 | const s = decodeURIComponent(ssidEnc || ''); |
| 3914 | const box = document.getElementById('wifi-fs-search'); |
| 3915 | if (box) { box.value = s; _wifiFsRenderList(); } |
| 3916 | } |
| 3917 | |
| 3918 | // Hand the AP to the coverage heatmap and drop back to the page, where the |
| 3919 | // walk-around survey lives. |
| 3920 | function wifiFsSurveyAp(bssid) { |
| 3921 | const sel = document.getElementById('wifi-hm-ap'); |
| 3922 | if (sel && [...sel.options].some(o => o.value === bssid)) sel.value = bssid; |
| 3923 | if (_wifiState.fs.open) wifiToggleFullscreen(); |
| 3924 | const card = document.getElementById('wifi-heatmap'); |
| 3925 | if (card && card.scrollIntoView) card.scrollIntoView({ behavior: 'smooth', block: 'center' }); |
| 3926 | } |
| 3927 | |
| 3928 | // ---- WiFi Defense → Analyzer pivot ----------------------------------------- |
| 3929 | // WIDS detections link here: jump to the Spectrum Analyzer, select the |
| 3930 | // offending BSSID and keep it highlighted (red, ⚠ WIDS) until dismissed. |
| 3931 | // `flagged` true → this BSSID is an actual WiFi Defense finding: red "🛡 Flagged |
| 3932 | // by WiFi Defense" banner + ⚠ WIDS highlight, kept until dismissed. |
| 3933 | // `flagged` false → the user just clicked an AP to inspect it: it's selected and |
| 3934 | // shown in blue ("📶 Access Point selected"), with no threat |
| 3935 | // styling, so a benign AP is never mistaken for a WIDS hit. |
| 3936 | // Defaults to true so any un-updated caller keeps the safe (flagged) behaviour. |
| 3937 | function wifiPivotFromDefense(bssid, ssidEnc, flagged) { |
| 3938 | flagged = (flagged === undefined) ? true : !!flagged; |
| 3939 | const target = { bssid: (bssid || '').toLowerCase(), |
| 3940 | ssid: ssidEnc ? decodeURIComponent(ssidEnc) : '', applied: false }; |
| 3941 | if (flagged) { _wifiState.flagged = target; _wifiState.pivotSelect = null; } |
| 3942 | else { _wifiState.pivotSelect = target; _wifiState.flagged = null; } |
| 3943 | const pick = _wifiState.flagged || _wifiState.pivotSelect; |
| 3944 | // Widen to all bands so the band filter can't hide the target. |
| 3945 | _wifiState.band = 'all'; |
| 3946 | document.querySelectorAll('#wifi-band-group .wifi-band').forEach(b => { |
nothing calls this directly
no test coverage detected