Skip to content

Commit

Permalink
Merge pull request #25 from ADJazzzz/dev
Browse files Browse the repository at this point in the history
1.3.9
  • Loading branch information
ADJazzzz authored Sep 5, 2024
2 parents 0bbd109 + bd11bcb commit cbc453a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 18 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## NEXT_VERSION

## [1.3.9](https://github.com/ADJazzzz/BLSPAM/compare/1.3.8...1.3.9) 2024-09-05

### 修复

- 修复因注入过早导致控制面板错位

## [1.3.8](https://github.com/ADJazzzz/BLSPAM/compare/1.3.7...1.3.8) 2024-09-02

### 调整
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bilibili-live-spamer",
"private": true,
"version": "1.3.8",
"version": "1.3.9",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
30 changes: 16 additions & 14 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,24 @@ const handleUpdateTheme = () => {
const observer = new MutationObserver((mutationsList, observer) => {
const controlPanel = dq('#control-panel-ctnr-box')
if (controlPanel) {
const oldTheme = dq('.icon-left-part')
const newTheme = dq('.chat-input-ctnr-new.p-relative')
setTimeout(() => {
const oldTheme = dq('.icon-left-part')
const newTheme = dq('.chat-input-ctnr-new.p-relative')
if (oldTheme || newTheme) {
if (oldTheme) {
renderPanel('.icon-left-part', { marginLeft: '4px', display: 'inline-block' })
}
if (newTheme) {
renderPanel('.chat-input-ctnr-new.p-relative', {
marginRight: '4px',
alignSelf: 'center'
})
if (oldTheme || newTheme) {
if (oldTheme) {
renderPanel('.icon-left-part', { marginLeft: '4px', display: 'inline-block' })
}
if (newTheme) {
renderPanel('.chat-input-ctnr-new.p-relative', {
marginRight: '4px',
alignSelf: 'center'
})
}
}
observer.disconnect()
logger.log('初始化完成')
}
}, 500)
observer.disconnect()
logger.log('初始化完成')
}
})
observer.observe(document.body, { childList: true, subtree: true })
Expand Down
4 changes: 3 additions & 1 deletion src/modules/default/userInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class UserInfo extends BaseModule {
try {
const response = (await BILIAPI.nav()) as UserResponse.Nav
if (response.code === 0) {
this.logger.log('UserInfo', response)
return Promise.resolve(response.data)
} else {
this.logger.error('获取用户信息出错', response.message)
Expand All @@ -26,7 +27,7 @@ class UserInfo extends BaseModule {
const windowBiliLive = unsafeWindow.BilibiliLive
if (windowBiliLive) {
clearInterval(timer)
this.logger.log(windowBiliLive)
this.logger.log('windowBiliLive', windowBiliLive)
resolve(windowBiliLive)
}
}, 200)
Expand All @@ -43,6 +44,7 @@ class UserInfo extends BaseModule {
try {
const response = (await BILIAPI.getEmoticons('pc', roomID)) as LiveResponse.GetEmoticons
if (response.code === 0) {
this.logger.log('EmotionData', response)
EmotionData.push(...response.data.data)
return Promise.resolve(EmotionData)
} else {
Expand Down

0 comments on commit cbc453a

Please sign in to comment.