AnkiWebView Inspector [Support thread]

This is the official support thread for my add-on AnkiWebView Inspector.

7 Likes

Thanks for the 2.1.50 update - it’s super helpful for add-on development!

3 Likes

Not sure exactly which update broke it, but rightclicking on the Add Window no longer shows the Inspect option in the context menu.

@shallash Thanks for the report.

I have tested the add-on in the following environments and cannot reproduce the issue.

  • Win10
    • 2.1.50 - 54 (Qt5 and Qt6)
    • source code (b9fd668) Qt6 build
  • Lubuntu (a Ubuntu flavor) 22.04
    • 2.1.54 (Qt6)
    • source code (b9fd668) Qt6 build

If you run Anki with only the add-on enabled, does the issue still occur? If not, then the issue may be caused by another add-on that monkey-patches the editor’s context menu in an inappropriate way.

I should have thought of trying that before posting! The issue does go away when it’s the only addon enabled, thanks.

1 Like

Is it possible to have an option to not make the inspector collapse, I want the lines of code to stay open. Hope you can make it a setting that one can toggle on and off

Due to my poor understanding of English, I am not sure if I understand your question correctly. Do you perhaps mean that when you close a sub-window (such as editor, previewer, or stats) with the inspector open, you want the inspector to automatically open the next time you open that sub-window and restore the Console tab, etc. to the state it was in at the time of closing? If that’s what you mean, then…

  • Restoring the state

    • Probably impossible.
  • Automatically opening the inspector when opening a sub-window

    • It is technically possible to implement that functionality. However, I am afraid I have no intention of implementing it at this time, as it would require considerable changes to the code, and I don’t see the need for that functionality.

It is quite hard to explain, but I appreciate you trying to help out HKR. If I do have more question, I will ask again. But no problems I understand the difficulties on your part. Have a great one HKR(:

1 Like

For some reason, I am not able to get this add-on to work. I have downloaded it twice, and I have restarted Anki twice. I have also disabled all over add-ons. The button never pops up. I am running Anki 23.12.1 Qt 6.5.3 Mac OS Sonoma 14.1.1

What part of the window are you right-clicking on?
image

I’m an idiot. That is all. I did not see where I was supposed to right-click. I was looking for the button to pop up

1 Like

How can i save changes made in WebView inspector?

If you mean these sorts of settings – there’s unfortunately no way currently.

1 Like

It’d be nice if addons using webviews had a way to register themselves with this addon.

Maybe a hook that allows addons to indicate if they’re handling the webview window, returning an optional WindowInfo :thinking: