mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
avoid internal URLs in alert titlebar
https://forums.ankiweb.net/t/anki-stats-no-longer-displaying-invalid-data-found-please-use-check-database-to-fix-the-problem/1902
This commit is contained in:
parent
3019d0dfdf
commit
2eee4cb04e
1 changed files with 4 additions and 1 deletions
|
@ -15,7 +15,7 @@ from anki.utils import isLin, isMac, isWin
|
||||||
from aqt import gui_hooks
|
from aqt import gui_hooks
|
||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
from aqt.theme import theme_manager
|
from aqt.theme import theme_manager
|
||||||
from aqt.utils import openLink
|
from aqt.utils import openLink, showInfo
|
||||||
|
|
||||||
serverbaseurl = re.compile(r"^.+:\/\/[^\/]+")
|
serverbaseurl = re.compile(r"^.+:\/\/[^\/]+")
|
||||||
|
|
||||||
|
@ -122,6 +122,9 @@ class AnkiWebPage(QWebEnginePage):
|
||||||
def _onCmd(self, str):
|
def _onCmd(self, str):
|
||||||
return self._onBridgeCmd(str)
|
return self._onBridgeCmd(str)
|
||||||
|
|
||||||
|
def javaScriptAlert(self, url: QUrl, text: str):
|
||||||
|
showInfo(text)
|
||||||
|
|
||||||
|
|
||||||
# Add-ons
|
# Add-ons
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
|
Loading…
Reference in a new issue