mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
17 lines
No EOL
415 B
TypeScript
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}
|
|
} |