Fix warnings

This commit is contained in:
Luc Mcgrady 2025-10-02 18:03:16 +01:00
parent f1c50b1ca2
commit 368c1958d2
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C
2 changed files with 6 additions and 4 deletions

View file

@ -3,10 +3,11 @@ import "../../reviewer/reviewer.scss";
addEventListener("message", (e) => {
switch (e.data.type) {
case "html":
case "html": {
document.body.innerHTML = e.data.value;
break;
case "nightMode":
}
case "nightMode": {
// This method currently "Flashbangs" the user if they have nightmode on and is a placeholder
// I will probably use #night-mode in the url.
const root = document.querySelector("html")!;
@ -20,9 +21,11 @@ addEventListener("message", (e) => {
root.className = nightMode ? "night-mode" : "";
root.setAttribute("data-bs-theme", nightMode ? "dark" : "light");
break;
default:
}
default: {
console.warn(`Unknown message type: ${e.data.type}`);
break;
}
}
});

View file

@ -1,4 +1,3 @@
import { bridgeCommand } from "@tslib/bridgecommand";
import { writable } from "svelte/store";
import type { AnswerButtonInfo } from "./types";