Giter Club home page Giter Club logo

anki21-addon-ankiwebview-inspector's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

anki21-addon-ankiwebview-inspector's Issues

Mobile Inspector

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.

Inspector not working in editor?

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

PyQt6 update breaks this add-on

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.

Project settings

  • #10
  • Python linting/formatting config
    • flake8
    • black
    • isort
    • mypy
  • VS Code settings
  • .gitattributes
  • manifest.json
  • bash scripts
    • zip .ankiaddon
    • create symlink from src/ to addons21/

Major rework

  • support Anki 2.1.50+
    • scoped PyQt enums
    • #6
  • display the inspector side-by-side or stacked vertically with the webview within a sub-window, such as the editor or card layout dialog
  • zoom
  • highlight the right-clicked element

Update docs

  • https://shields.io/
  • screenshots
  • mention how to enable debug messages
  • changelog
  • fix link to Writing Anki Add-ons doc
  • drop support for Anki 2.19 and below

New error in 2.1.33 or is it just me?

Hi,

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

An exception occurs every time the inspector is invoked from a card screen.

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'

Settings are not saved

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).

image

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.

image

Thanks!

System Theme is not detected in Preferences

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"

image

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.