Anki/ts/routes/reviewer/reviewer.ts
Luc Mcgrady 1e67a773c6
./check
2025-09-04 00:26:10 +01:00

18 lines
449 B
TypeScript

import { writable } from "svelte/store";
import { preloadAnswerImages } from "../../reviewer/images";
export function setupReviewer() {
const html = writable("");
const cardClass = writable("");
function showQuestion(q, a, cc) {
html.set(q);
cardClass.set(cc);
preloadAnswerImages(a);
}
globalThis._showAnswer = html.set;
globalThis._showQuestion = showQuestion;
return { html, cardClass };
}