Skip to content
This repository has been archived by the owner on Dec 26, 2024. It is now read-only.

Commit

Permalink
fix: independent window concatMsg #55
Browse files Browse the repository at this point in the history
  • Loading branch information
festoney8 committed Oct 29, 2024
1 parent 58fee20 commit fe2b37c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "Telegram Theme",
"slug": "telegram_theme",
"description": "高仿 Telegram 风格的 QQNT 主题",
"version": "4.5.0",
"version": "4.5.1",
"icon": null,
"authors": [
{
Expand Down
5 changes: 3 additions & 2 deletions src/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const adjustContactWidth = async () => {

// 仿Telegram,拼接消息,头像浮动
const concatMsg = async () => {
const msgList = document.querySelector('#ml-root .ml-list')
const msgList = document.querySelector('.ml-list')
if (!msgList) {
return
}
Expand Down Expand Up @@ -305,6 +305,7 @@ const concatMsg = async () => {
}
}

handle()
const observer = new MutationObserver(async (mutationList) => {
for (let i = 0; i < mutationList.length; i++) {
if (mutationList[i].addedNodes.length) {
Expand Down Expand Up @@ -351,7 +352,7 @@ const onMessageCreate = async () => {
},
)
// 拼接消息,头像浮动
waitForEle('#ml-root .ml-list', () => {
waitForEle('.ml-list', () => {
concatMsg().catch((err) => {
error('concatMsg err', err.toString())
})
Expand Down

0 comments on commit fe2b37c

Please sign in to comment.