Fix for Anki version 24.04+

This commit is contained in:
gugutu 2024-03-01 16:19:38 +08:00 committed by GitHub
parent 65cc6c0b12
commit d6034c6dcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -26,7 +26,13 @@ class EditorPreview(object):
buildversion = buildinfo.version.split(".")
# Anki changed their versioning scheme in 2023 to year.month(.patch), causing things to explode here.
if not int(buildversion[0]) >= 23 and int(buildversion[2]) < 45: # < 2.1.45
if int(buildversion[0]) >= 24:
self.js = [
"js/mathjax.js",
"js/vendor/mathjax/tex-chtml-full.js",
"js/reviewer.js",
]
if not int(buildversion[0]) == 23 and int(buildversion[2]) < 45: # < 2.1.45
self.js = [
"js/vendor/jquery.min.js",
"js/vendor/css_browser_selector.min.js",