mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-14 16:33:54 +08:00
internal
This commit is contained in:
parent
a2edfa15b3
commit
aadc0befd9
@ -19,7 +19,7 @@ class goo(cishubase):
|
||||
xx = re.sub("</a>", "", xx)
|
||||
if len(xx):
|
||||
return (
|
||||
'<div style="text-align: center;"><a target="_blank" href="{}">link</a></div>'.format(
|
||||
'<div style="text-align: center;"><a href="{}">link</a></div>'.format(
|
||||
url
|
||||
)
|
||||
+ xx
|
||||
|
@ -27,7 +27,7 @@ class weblio(cishubase):
|
||||
join = "<br>".join(_all)
|
||||
if len(join):
|
||||
return (
|
||||
'<div style="text-align: center;"><a target="_blank" href="{}">link</a></div>'.format(
|
||||
'<div style="text-align: center;"><a href="{}">link</a></div>'.format(
|
||||
url
|
||||
)
|
||||
+ join
|
||||
|
@ -28,7 +28,7 @@ class youdao(cishubase):
|
||||
|
||||
if len(fnd[0][1]):
|
||||
return (
|
||||
'<div style="text-align: center;"><a target="_blank" href="{}">link</a></div><br>'.format(
|
||||
'<div style="text-align: center;"><a href="{}">link</a></div><br>'.format(
|
||||
"https://dict.youdao.com/result?word={}&lang={}".format(
|
||||
quote(word), self.srclang
|
||||
)
|
||||
|
@ -613,7 +613,6 @@ class mshtmlWidget(QWidget):
|
||||
self.browser.resize(0, 0, size[0], size[1])
|
||||
|
||||
def setHtml(self, html):
|
||||
html = html.replace('target="_blank"', "")
|
||||
html = """<html><head><meta http-equiv='x-ua-compatible' content='IE=edge'></head><body style=" font-family:'{}'">{}</body></html>""".format(
|
||||
QFontDatabase.systemFont(QFontDatabase.GeneralFont).family(), html
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user