MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / refreshSensingInstallCard

Function refreshSensingInstallCard

web/scripts/ragnar_modern.js:914–948  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

912// viewport (it cannot escape its own container from inside the iframe).
913let _observatoryFsInit = false;
914function initObservatoryFullscreenBridge() {
915 if (_observatoryFsInit) return;
916 _observatoryFsInit = true;
917 window.addEventListener('message', (e) => {
918 if (!e.data || e.data.type !== 'observatory-fullscreen') return;
919 const obs = document.getElementById('observatory-frame');
920 if (!obs) return;
921 const expanded = obs.classList.toggle('observatory-fullscreen');
922 if (expanded) {
923 const req = obs.requestFullscreen || obs.webkitRequestFullscreen;
924 if (req) Promise.resolve(req.call(obs)).catch(() => { /* CSS overlay still applies */ });
925 } else {
926 const exit = document.exitFullscreen || document.webkitExitFullscreen;
927 if (exit && (document.fullscreenElement || document.webkitFullscreenElement)) {
928 Promise.resolve(exit.call(document)).catch(() => {});
929 }
930 }
931 });
932 // Keep the CSS overlay in sync when the user leaves OS fullscreen via Esc.
933 document.addEventListener('fullscreenchange', () => {
934 const obs = document.getElementById('observatory-frame');
935 if (obs && !document.fullscreenElement) obs.classList.remove('observatory-fullscreen');
936 });
937}
938initObservatoryFullscreenBridge();
939
940function showRusenseSubtab(name) {
941 if (!RUSENSE_SUBTABS.includes(name)) name = 'dashboard';
942 _rusenseCurrent = name;
943 _setRusenseActive(name);
944
945 const host = document.getElementById('rusense-host');
946 const obs = document.getElementById('observatory-frame');
947
948 if (name === 'observatory') {
949 // Full-page WebGL app: show the iframe and hide the shadow-island views.
950 if (host) host.classList.add('hidden');
951 if (obs) {

Callers 2

tickFunction · 0.70
showTabFunction · 0.70

Calls 1

startSensingLogPollFunction · 0.70

Tested by

no test coverage detected