Naive reviewer

This commit is contained in:
Luc Mcgrady 2025-09-03 22:57:36 +01:00
parent eac356139c
commit d0d1c519e6
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C
2 changed files with 10 additions and 1 deletions

View file

@ -63,7 +63,7 @@ export function setupBottomBar() {
remainingIndex.set(idx);
}
globalThis._showQuestion = _showQuestion;
globalThis.showQuestion = _showQuestion;
globalThis.showAnswer = _showAnswer;
globalThis._updateRemaining = _updateRemaining;

View file

@ -1,7 +1,16 @@
import { writable } from "svelte/store"
import { preloadAnswerImages } from "../../reviewer/images"
export function setupReviewer() {
const html = writable("")
function showQuestion(q, a, bodyclass) {
html.set(q)
preloadAnswerImages(a)
}
globalThis._showAnswer = html.set
globalThis._showQuestion = showQuestion
return {html}
}