This commit is contained in:
恍兮惚兮 2025-01-09 00:21:51 +08:00
parent 63e5dfd27b
commit c46b9e05b1
4 changed files with 9 additions and 4 deletions

View File

@ -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)

View File

@ -62,7 +62,7 @@ function safe_weblio_search_word(word){
}</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:" + _)

View File

@ -813,11 +813,13 @@ class AnkiWindow(QWidget):
("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],
}
]

View File

@ -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>'