hikaru-y / anki21-addon-ankiwebview-inspector Goto Github PK
View Code? Open in Web Editor NEWAn add-on to inspect and debug Anki's webviews
Home Page: https://ankiweb.net/shared/info/31746032
License: GNU Affero General Public License v3.0
An add-on to inspect and debug Anki's webviews
Home Page: https://ankiweb.net/shared/info/31746032
License: GNU Affero General Public License v3.0
Is there any way to inspect what will be displayed on mobile? There are a couple important inconsistencies between my Mac and iPhone, and I can't figure out what's wrong on my iPhone but can't see the mobile code.
Hello,
I have the problem that when I'm in the editor, I can't open the inspector with right click. Is this intended or is this some kind of bug?
I'd really like to change some thinges with the css injector, but I need the attribute names for this.
Greetings from Germany
Hi, Hikaru!
I'm running the bleeding-edge dev build at the moment and saw that ankitects/anki#1406 will break the AnkiWebView Inspector.
check_qt_version
returns False
and prevents the initialization of Inspector
. When bypassing the version check, this error occurs on startup:
...
.../inspector.py", line 28, in __init__
Qt.LeftDockWidgetArea|Qt.RightDockWidgetArea|Qt.BottomDockWidgetArea)
AttributeError: type object 'Qt' has no attribute 'LeftDockWidgetArea'
Thanks for this quintessential add-on! I'd be lost without it.
src/
to addons21/
No handles for adjusting width, never worked with dockwindows in qt so idk how to fix it myself either
Writing Anki Add-ons
docHi,
I was trying to develop some js heavy template and since updating anki to 2.1.33 I can't seem to make your addon work.
I get instantly the warning/error DevTools failed to parse SourceMap: http://127.0.0.1:46369/main.min.js.map
in the console when clicking "inspect" during a review. This means I can't access what I need using the usual document.document.something
objects that I need.
I tried rebooting, toggling "show selected context only" and "enable js source maps" as suggested in StackOverflow but to no avail.
I am on ubuntu 18.04. Am I the only one affected by this? Could you point me in the right direction? I really am not used to debugging js or using devtools.
Thanks a lot! And great addon btw
https://github.com/microsoft/vscode-python/wiki/Migration-to-Python-Tools-Extensions
"python.linting.enabled": true,
"python.linting.flake8Enabled": true,
"flake8.args" = ["--config=<file>"]
ankitects/anki PR-1850
Thanks so much for the add-on, it's super useful.
I'd like to also use the inspector while I style my cards. Is there a way to show the inspector in that window too?
When i right-click on my card preview and select "Inspect", nothing happens.
If I ignored the error everything seemed to work fine.
Error
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 on the add-on support site.
Debug info:
Anki 2.1.43 (0fbae6bc) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-04-07 07:35:11
Caught exception:
Traceback (most recent call last):
File "aqt\webview.py", line 36, in cmd
File "aqt\webview.py", line 135, in _onCmd
File "aqt\webview.py", line 567, in _onBridgeCmd
AttributeError: 'NoneType' object has no attribute 'installEventFilter'
The configurable settings inside DevTools are not saved. They revert to defaults each time the Inspector is opened and don't persist between different Anki windows. Specifically observed with Appearance settings -- like Theme (Light/Dark) and Language (which requires an extra reload step after changing).
If they cannot be saved -- could the add-on at least inherit the Anki system settings by default? It seems a fair bet that many users would want the DevTools interface in the same color theme and language that they have set in Anki.
Thanks!
This really is a minor issue, but (hopefully) equally simple to fix for anybody accustomed with the project.
When my system theme is set to 'Dark Mode' I'd expect the web inspector to adopt this theme, when Preferences>Appearance>Theme is set to System Preference
, but it actually remains in light mode.
Anki's theme is also set to "Follow System"
Occurred on:
Anki 23.12.1 (1a1d4d54) (ao)
Python 3.9.15 Qt 6.5.3 PyQt 6.5.3
Platform: macOS-14.3.1-arm64-arm-64bit
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.