1// Boot-splash run-mode label. External rather than inline so the app can ship a 2// strict `script-src 'self'` (no unsafe-inline) â see the CSP in vite.config.ts. 3// Keep in sync with APP_RUN_MODE_LABELS in src/lib/platform/app-run-mode.ts. 4(function () { 5 var el = document.getElementById('app-splash-run-mode'); 6 if (!el) return; 7 8 var nav = navigator; 9 var mode = 'web'; 10 11 if ('standalone' in nav && nav.standalone) { 12 mode = 'bookmark'; 13 } else if ( 14 window.matchMedia('(display-mode: standalone)').matches || 15 window.matchMedia('(display-mode: fullscreen)').matches || 16 window.matchMedia('(display-mode: minimal-ui)').matches 17 ) { 18 mode = 'pwa'; 19 } 20 21 var labels = { web: 'Browser', pwa: 'Web app', bookmark: 'Home screen' }; 22 el.textContent = labels[mode]; 23})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.