mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 16:02:23 -04:00
fix delays caused by console.log regression in PR #560
https://anki.tenderapp.com/discussions/beta-testing/1918-reliably-reproduced-bug-in-2124beta6
This commit is contained in:
parent
394f7c630c
commit
aa562f490c
1 changed files with 4 additions and 1 deletions
|
@ -71,7 +71,10 @@ class AnkiWebPage(QWebEnginePage): # type: ignore
|
|||
def javaScriptConsoleMessage(self, level, msg, line, srcID):
|
||||
# not translated because console usually not visible,
|
||||
# and may only accept ascii text
|
||||
srcID = re.sub(r"(?mi).+://[^/]+", "", srcID)
|
||||
if srcID.startswith("data"):
|
||||
srcID = ""
|
||||
else:
|
||||
srcID = re.sub(r"(?mi).+://[^/]+", "", srcID[:80])
|
||||
if level == QWebEnginePage.InfoMessageLevel:
|
||||
level = "info"
|
||||
elif level == QWebEnginePage.WarningMessageLevel:
|
||||
|
|
Loading…
Reference in a new issue