mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Naive reviewer
This commit is contained in:
parent
eac356139c
commit
d0d1c519e6
2 changed files with 10 additions and 1 deletions
|
@ -63,7 +63,7 @@ export function setupBottomBar() {
|
|||
remainingIndex.set(idx);
|
||||
}
|
||||
|
||||
globalThis._showQuestion = _showQuestion;
|
||||
globalThis.showQuestion = _showQuestion;
|
||||
globalThis.showAnswer = _showAnswer;
|
||||
globalThis._updateRemaining = _updateRemaining;
|
||||
|
||||
|
|
|
@ -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}
|
||||
}
|
Loading…
Reference in a new issue