This commit is contained in:
RumovZ 2021-10-17 22:14:44 +02:00
parent 2a93868922
commit ca57cb964c
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ def _legacy_card_stats(
) -> str:
"A quick hack to preserve compatibility with the old HTML string API."
random_id = f"cardinfo-{base62(random.randint(0, 2 ** 64 - 1))}"
varName = random_id.replace('-', '')
varName = random_id.replace("-", "")
return f"""
<div id="{random_id}"></div>
<script src="js/vendor/bootstrap.bundle.min.js"></script>

View File

@ -64,7 +64,7 @@ class CardInfoDialog(QDialog):
self.setLayout(layout)
self.web.eval(
"const cardInfo = anki.cardInfo(document.getElementById('main'));\n" \
"const cardInfo = anki.cardInfo(document.getElementById('main'));\n"
"cardInfo.then((c) => c.$set({ includeRevlog: true }));"
)
self.update_card(card_id)