zacharied / anki-content-injector Goto Github PK
View Code? Open in Web Editor NEWAnki add-on to "overlay" HTML/CSS/JS content on cards at review-time
Anki add-on to "overlay" HTML/CSS/JS content on cards at review-time
{{Tags}}, or {{info::Id}} from Additional Card Fields (Fork for 2.1) https://ankiweb.net/shared/info/744725736 don't expand after injection. It would be nice to be able to use this for adding the subject on a card based on tags, or as a seed for randomizing multiple choice questions in javascript without having it randomize differently on the front versus the back side.
just update from v2.1.40 to v.2.1.49, and find that script injecting is not working
If not the HTML and js, just the css?
ps. I have added "_global.css" in "collection.media", and it just couldn't work.
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue to the add-on author.
Debug info:
Anki 2.1.54 (b6a7760c) Python 3.9.7 Qt 6.3.1 PyQt 6.3.1
Platform: Mac 12.4
Flags: frz=True ao=True sv=3
Add-ons, last update check: 2022-10-22 22:56:08
Add-ons possibly involved: Content Injector
Caught exception:
Traceback (most recent call last):
File "aqt.webview", line 42, in cmd
File "aqt.webview", line 149, in _onCmd
File "aqt.webview", line 624, in _onBridgeCmd
File "aqt.overview", line 92, in _linkHandler
File "aqt.main", line 673, in moveToState
File "aqt.main", line 694, in _reviewState
File "aqt.reviewer", line 150, in show
File "aqt.reviewer", line 170, in refresh_if_needed
File "aqt.reviewer", line 233, in nextCard
File "aqt.reviewer", line 354, in _showQuestion
File "aqt.hooks_gen", line 1175, in __call__
File "anki.hooks", line 45, in runFilter
File "/Users/roger_fan/Library/Application Support/Anki2/addons21/166455199/__init__.py", line 62, in injectContent
with open(f, 'r', encoding='utf-8') as injectFile:
FileNotFoundError: [Errno 2] No such file or directory: '_global.css'
I just installed this add-on and when I go to edit a card, I get an error. If I disable the add-on, the error goes away. Here's the info from the error message:
When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site.
Debug info:
Anki 2.1.33 (3f403040) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Platform: Windows 10
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-09-01 13:04:22
Caught exception:
Traceback (most recent call last):
File "aqt\webview.py", line 493, in handler
File "aqt\editor.py", line 481, in
File "aqt\editor.py", line 364, in onCardLayout
File "aqt\clayout.py", line 66, in init
File "<C:\Program Files\Anki\decorator.pyc:decorator-gen-6>", line 2, in setupMainArea
File "anki\hooks.py", line 638, in decorator_wrapper
File "anki\hooks.py", line 635, in repl
File "C:\Users[DELETED]\AppData\Roaming\Anki2\addons21\166455199_init.py", line 79, in myClayoutMainArea
editor.pform.verticalLayout_3.addWidget(checkbox)
AttributeError: 'Ui_Form' object has no attribute 'verticalLayout_3'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.