mirror of
https://github.com/ankitects/anki.git
synced 2025-12-14 07:10:59 -05:00
Format
This commit is contained in:
parent
2a93868922
commit
ca57cb964c
2 changed files with 2 additions and 2 deletions
|
|
@ -28,7 +28,7 @@ def _legacy_card_stats(
|
||||||
) -> str:
|
) -> str:
|
||||||
"A quick hack to preserve compatibility with the old HTML string API."
|
"A quick hack to preserve compatibility with the old HTML string API."
|
||||||
random_id = f"cardinfo-{base62(random.randint(0, 2 ** 64 - 1))}"
|
random_id = f"cardinfo-{base62(random.randint(0, 2 ** 64 - 1))}"
|
||||||
varName = random_id.replace('-', '')
|
varName = random_id.replace("-", "")
|
||||||
return f"""
|
return f"""
|
||||||
<div id="{random_id}"></div>
|
<div id="{random_id}"></div>
|
||||||
<script src="js/vendor/bootstrap.bundle.min.js"></script>
|
<script src="js/vendor/bootstrap.bundle.min.js"></script>
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ class CardInfoDialog(QDialog):
|
||||||
self.setLayout(layout)
|
self.setLayout(layout)
|
||||||
|
|
||||||
self.web.eval(
|
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 }));"
|
"cardInfo.then((c) => c.$set({ includeRevlog: true }));"
|
||||||
)
|
)
|
||||||
self.update_card(card_id)
|
self.update_card(card_id)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue