mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 23:12:21 -04:00
fix ugly js confirm box
https://forums.ankiweb.net/t/2-1-45-release-candidate/11362/2
This commit is contained in:
parent
49f7e0c083
commit
e7189f4af5
1 changed files with 5 additions and 2 deletions
|
@ -13,7 +13,7 @@ from anki.utils import isLin, isMac, isWin
|
|||
from aqt import colors, gui_hooks
|
||||
from aqt.qt import *
|
||||
from aqt.theme import theme_manager
|
||||
from aqt.utils import openLink, showInfo, tr
|
||||
from aqt.utils import askUser, openLink, showInfo, tr
|
||||
|
||||
serverbaseurl = re.compile(r"^.+:\/\/[^\/]+")
|
||||
|
||||
|
@ -138,9 +138,12 @@ class AnkiWebPage(QWebEnginePage):
|
|||
def _onCmd(self, str: str) -> Any:
|
||||
return self._onBridgeCmd(str)
|
||||
|
||||
def javaScriptAlert(self, url: QUrl, text: str) -> None:
|
||||
def javaScriptAlert(self, frame: Any, text: str) -> None:
|
||||
showInfo(text)
|
||||
|
||||
def javaScriptConfirm(self, frame: Any, text: str) -> bool:
|
||||
return askUser(text)
|
||||
|
||||
|
||||
# Add-ons
|
||||
##########################################################################
|
||||
|
|
Loading…
Reference in a new issue