mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Anki is a smart spaced repetition flashcard program
![]() Anki 2.1.28 Beta https://forums.ankiweb.net/t/anki-2-1-28-beta/629/26 > Did the requirements on how to expose resources on the internal server change? Because scripts, css files and the like, registered with setWebExports, do not work anymore with beta2. > A look at the console shows the following for all resources: > Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR) **\Anki2\addons21\someaddon\__init__.py** ```py from aqt import mw import aqt # assuming add-on folder is named "test" # and assuming a 'test.js' is in the same folder addon_id = "someaddon" port = mw.mediaServer.getPort() mw.addonManager.setWebExports(addon_id, ".*\\.js$") print("Hello") aqt.editor._html += f""" <script> var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'http://127.0.0.1:{port}/_addons/{addon_id}/test.js'; document.body.appendChild(script); </script>""" ``` |
||
---|---|---|
.github | ||
meta | ||
proto | ||
pylib | ||
qt | ||
rslib | ||
rspy | ||
scripts | ||
ts | ||
.gitattributes | ||
.gitignore | ||
CONTRIBUTORS | ||
LICENSE | ||
Makefile | ||
pkgkey.asc | ||
README.contributing | ||
README.development | ||
README.md | ||
run |
This repo contains all the code for the computer version of Anki.
If you'd like to try development builds of Anki but don't feel comfortable building the code, please see https://betas.ankiweb.net/#/
For more information on building, please see README.development.
If you'd like to contribute code, please see README.contributing.