Anki/ts/routes/reviewer/reviewer.ts
2025-09-03 23:07:04 +01:00

17 lines
No EOL
415 B
TypeScript

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