This commit is contained in:
恍兮惚兮 2024-06-20 23:17:56 +08:00
parent df65bfb4b3
commit 833d65a207

View File

@ -33,8 +33,10 @@ class TextBrowser(QWidget, dataget):
def showEvent(self, e): def showEvent(self, e):
if not self.isfirst: if not self.isfirst:
return return
self.__loadextra(0)
self.webivewwidget.on_load.connect(self.__loadextra)
self.isfirst = False def __loadextra(self, _):
if os.path.exists("userconfig/extrahtml.html"): if os.path.exists("userconfig/extrahtml.html"):
with open("userconfig/extrahtml.html", "r", encoding="utf8") as ff: with open("userconfig/extrahtml.html", "r", encoding="utf8") as ff:
self.set_extra_html(ff.read()) self.set_extra_html(ff.read())