Closed nickdvlpr closed 4 years ago
Hey! Sorry, busy week. The files under /resources are actually loaded into Qt's resource and then accessed from there instead of reading from the disk directly. This was mostly a concession to trouble with unicode paths in Anki 2.0, and security policies against local filesystem access in early Anki 2.1 releases. Nowadays it's simple enough to load CSS & JS in directly, and in the next major release that's the approach Review Heatmap will also likely be taking. Hope that explains things!
Closing this for now, but if you have any follow-up questions feel free to shoot away.
Thanks for the info! Would there be a good way to change the colors of Review Heatmap for my own personal use? Specifically the grays used for the background of the boxes.
There is no API or anything, but you can just inject your own CSS in the respective views and overrule the add-on's default CSS: https://github.com/glutanimate/review-heatmap/blob/master/resources/web/review-heatmap.css#L222
Injecting your own CSS should be fairly easy if you use the new webhooks in Anki 2.1.21 and up.
I'm just wondering about your reasoning because I'm considering doing the same for my add-ons. Is it so that you can "update" the appearance of the add-on without requiring the user to download an update on AnkiWeb?
Specifically referring to this file: review-heatmap/resources/web/review-heatmap.css
Thanks!