. The theme switch (element theme_switch, webroot/js/plenario.js * `Theme`) writes the same localStorage key. * * @var \App\View\AppView $this * @var string $key localStorage key (presenter uses its own, the beamer is not the laptop) * @var string $fallback Theme without stored choice: '' = follow the system, 'dark' or 'light' * * Carries the CSP nonce of the request (see \App\Middleware\SecurityHeadersMiddleware). */ $key ??= 'plenario-theme'; $fallback ??= ''; $nonce = (string)$this->getRequest()->getAttribute('cspScriptNonce', ''); ?> > (function () { var theme = ; try { theme = localStorage.getItem() || theme; } catch (e) {} if (theme === 'light' || theme === 'dark') { document.documentElement.setAttribute('data-theme', theme); } })();