Skip to content

Commit

Permalink
refactor: 去掉关于开关显示和控制代码
Browse files Browse the repository at this point in the history
  • Loading branch information
eeelester committed Dec 25, 2024
1 parent 6b5ad00 commit a41d904
Show file tree
Hide file tree
Showing 14 changed files with 4 additions and 487 deletions.
264 changes: 0 additions & 264 deletions components/Popup/index.less

This file was deleted.

17 changes: 0 additions & 17 deletions components/Popup/index.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions components/Wrong/index.tsx

This file was deleted.

4 changes: 1 addition & 3 deletions constant/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const WS_SC_EVENT = 'ws_sc_change'
const MATCH_URL = /live.bilibili.com/
const POPUP_INITIAL_STATE = true

export { WS_SC_EVENT, MATCH_URL, POPUP_INITIAL_STATE }
export { WS_SC_EVENT }
35 changes: 0 additions & 35 deletions entrypoints/background.ts

This file was deleted.

9 changes: 0 additions & 9 deletions entrypoints/fullScreen.content/comm.ts

This file was deleted.

3 changes: 0 additions & 3 deletions entrypoints/fullScreen.content/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { existElement, mount, unmount } from './utils'
import ObservePageFullScreen from './observePageFullScreen'
import { popUpOnMessage } from './comm'

export default defineContentScript({
matches: ['https://live.bilibili.com/*'],
Expand All @@ -23,7 +22,5 @@ export default defineContentScript({
// 监听网页全屏模式
ObservePageFullScreen()

// 监听popup传输数据
popUpOnMessage()
},
})
4 changes: 0 additions & 4 deletions entrypoints/fullScreen.content/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { createRoot } from 'react-dom/client'
import type { Root } from 'react-dom/client'
import { LiveWS } from 'bilibili-live-ws'
import { ALREADY_HAVE_IT } from './const'
import { switchState } from './comm'
import type { DanmuInfo, RoomDetailInfo, RoomInfo } from './types'
import SCList from '@/components/ScList'
import type { DanmuDataProps } from '@/utils'
Expand All @@ -21,9 +20,6 @@ export let existElement: HTMLElement | null
export function mount(log: string) {
if (isMount)
return ALREADY_HAVE_IT
// 当用户在popup关闭此功能后
if (!switchState)
return

isMount = true

Expand Down
Loading

0 comments on commit a41d904

Please sign in to comment.