Skip to content

Open-source live-chat, email support, omni-channel desk. An alternative to Intercom, Zendesk, Salesforce Service Cloud etc. 🔥💬

496 B
Raw Blame
<%# Runs before first paint on every super admin page, and again when the system theme changes. %>
<script>
  (function () {
    var systemDark = window.matchMedia('(prefers-color-scheme: dark)');
    var apply = function () {
      var theme = localStorage.getItem('super-admin-theme');
      document.documentElement.classList.toggle('dark', theme === 'dark' || (theme !== 'light' && systemDark.matches));
    };
    apply();
    systemDark.addEventListener('change', apply);
  })();
</script>