()
| 35 | // --- ClamAV scanning UI helpers ---------------------------------------- |
| 36 | |
| 37 | function isVirusScanLikelyEnabled() { |
| 38 | try { |
| 39 | if ( |
| 40 | window.__FR_FLAGS && |
| 41 | Object.prototype.hasOwnProperty.call(window.__FR_FLAGS, 'clamavScanUploads') |
| 42 | ) { |
| 43 | return !!window.__FR_FLAGS.clamavScanUploads; |
| 44 | } |
| 45 | |
| 46 | // Fallbacks if you ever expose config globals directly |
| 47 | const cfg = |
| 48 | (window.appConfig) || |
| 49 | (window.FR_CONFIG) || |
| 50 | (window.__FR_CONFIG__) || |
| 51 | (window.siteConfig) || |
| 52 | null; |
| 53 | |
| 54 | return !!(cfg && cfg.clamav && cfg.clamav.scanUploads); |
| 55 | } catch (e) { |
| 56 | return false; |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | let _virusScanNoticeDismissed = false; |
| 61 |
no outgoing calls
no test coverage detected