From 7a75282626a033329310b95ec6cfaeb3c92f9c38 Mon Sep 17 00:00:00 2001 From: Yoonchae Lee Date: Mon, 4 Aug 2025 23:01:40 +0900 Subject: [PATCH] fix on_webview_cleanup not running on webview cleanup --- src/addon/colors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/addon/colors.py b/src/addon/colors.py index 3d22840..e0837b9 100644 --- a/src/addon/colors.py +++ b/src/addon/colors.py @@ -264,7 +264,7 @@ def on_webview_cleanup(webview: AnkiWebView) -> None: AnkiWebView.__init__ = wrap(AnkiWebView.__init__, on_webview_init, "before") # type: ignore -AnkiWebView.cleanup = wrap(AnkiWebView.cleanup, on_webview_init, "before") # type: ignore +AnkiWebView.cleanup = wrap(AnkiWebView.cleanup, on_webview_cleanup, "before") # type: ignore gui_hooks.webview_will_set_content.append(inject_web) gui_hooks.webview_did_inject_style_into_page.append(inject_web_ts) recolor_python()