Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
HIllya51 committed Jan 8, 2025
1 parent 63e5dfd commit c46b9e0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cpp/version.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

set(VERSION_MAJOR 6)
set(VERSION_MINOR 19)
set(VERSION_PATCH 0)
set(VERSION_PATCH 1)
set(VERSION_REVISION 0)
set(LUNA_VERSION "{${VERSION_MAJOR},${VERSION_MINOR},${VERSION_PATCH},${VERSION_REVISION}}")
add_library(VERSION_DEF ${CMAKE_CURRENT_LIST_DIR}/version_def.cpp)
Expand Down
2 changes: 1 addition & 1 deletion py/LunaTranslator/cishu/weblio.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __(match):
}</script>
"""
links = []
style = simplehtmlparser(html, "style", "<style>")[7:-8]
style = self.parse_stylesheet(simplehtmlparser(html, "style", "<style>")[7:-8], self.klass)
for link in simplehtmlparser_all(html, "link", '<link rel="stylesheet"'):
for _ in re.findall('href="(.*?)"', link):
links.append("https:" + _)
Expand Down
6 changes: 4 additions & 2 deletions py/LunaTranslator/gui/showword.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,11 +813,13 @@ def addanki(self):
("screenshot", self.editpath.text()),
]:
if len(_):
with open(_, "rb") as ff:
b64 = base64.b64encode(ff.read()).decode()
media.append(
[
{
"path": _,
"filename": str(uuid.uuid4()) + os.path.basename(_),
"data": b64,
"filename": str(uuid.uuid4()) + os.path.splitext(_)[1],
"fields": [k],
}
]
Expand Down
3 changes: 3 additions & 0 deletions py/files/anki/back.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
var htmlcontents = ''
var scriptElementss = []
var scriptElementsssrc = []
if (dictionaryInfo.length == 1) {
document.getElementById('tab_buttons').style.display = 'none'
}
for (var iiii = 0; iiii < dictionaryInfo.length; iiii++) {
htmltabbuttons += '<button type="button" onclick="onclickbtn(\'' + dictionaryInfo[iiii]['dict'] + '\')" id="luna_dict_btn_' + dictionaryInfo[iiii]['dict'] + '" class="tab-button' + (iiii == 0 ? ' active' : '') + '">' + dictionaryInfo[iiii]['name'] + '</button>'

Expand Down

0 comments on commit c46b9e0

Please sign in to comment.