From dd9528aa73b673b54b9b973f02e5d469729b1373 Mon Sep 17 00:00:00 2001 From: hikaru-y Date: Wed, 18 Aug 2021 01:58:23 +0900 Subject: [PATCH] Silence 'link preload' warning on the first card Due to 207e425, a harmless warning about 'link preload' will be output to the console on the first card. --- qt/aqt/webview.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qt/aqt/webview.py b/qt/aqt/webview.py index aa6903677..0e5d75d35 100644 --- a/qt/aqt/webview.py +++ b/qt/aqt/webview.py @@ -106,6 +106,9 @@ class AnkiWebPage(QWebEnginePage): if "MathJax localStorage" in buf: # silence localStorage noise return + elif "link preload" in buf: + # silence 'link preload' warning on the first card + return # ensure we don't try to write characters the terminal can't handle buf = buf.encode(sys.stdout.encoding, "backslashreplace").decode( sys.stdout.encoding