Fix: Showquestion is not defined

This commit is contained in:
Luc Mcgrady 2025-08-25 18:46:35 +01:00
parent 6869e9fd36
commit 244aade836
No known key found for this signature in database
GPG key ID: 4F3D7A0B17CC3D9C
2 changed files with 2 additions and 4 deletions

View file

@ -847,7 +847,7 @@ timerStopped = false;
maxTime = self.card.time_limit() / 1000 maxTime = self.card.time_limit() / 1000
else: else:
maxTime = 0 maxTime = 0
self.bottom.web.eval("showQuestion(%s,%d);" % (json.dumps(middle), maxTime)) self.bottom.web.eval("anki.showQuestion(%s,%d);" % (json.dumps(middle), maxTime))
def _showEaseButtons(self) -> None: def _showEaseButtons(self) -> None:
if not self._states_mutated: if not self._states_mutated:

View file

@ -7,8 +7,6 @@
import "./index.scss" import "./index.scss"
console.log("Hello world")
let time: number; // set in python code let time: number; // set in python code
let timerStopped = false; let timerStopped = false;
@ -35,7 +33,7 @@ function updateTime(): void {
let intervalId: number | undefined; let intervalId: number | undefined;
function showQuestion(txt: string, maxTime_: number): void { export function showQuestion(txt: string, maxTime_: number): void {
showAnswer(txt); showAnswer(txt);
time = 0; time = 0;
maxTime = maxTime_; maxTime = maxTime_;