mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 12:47:11 -05:00
Fix warnings
This commit is contained in:
parent
f1c50b1ca2
commit
368c1958d2
2 changed files with 6 additions and 4 deletions
|
|
@ -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,10 +21,12 @@ 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;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const base = document.createElement("base");
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { bridgeCommand } from "@tslib/bridgecommand";
|
||||
import { writable } from "svelte/store";
|
||||
import type { AnswerButtonInfo } from "./types";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue