We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df6840b commit 6b494c0Copy full SHA for 6b494c0
src/content-script/site-adapters/bilibili/index.mjs
@@ -6,10 +6,13 @@ export default {
6
try {
7
// B站页面是SSR的,如果插入过早,页面 js 检测到实际 Dom 和期望 Dom 不一致,会导致重新渲染
8
await waitForElementToExistAndSelect('img.bili-avatar-img')
9
- let oldPath = location.pathname
+ const getVideoPath = () =>
10
+ location.pathname + `?p=${new URLSearchParams(location.search).get('p') || 1}`
11
+ let oldPath = getVideoPath()
12
const checkPathChange = async () => {
- if (location.pathname !== oldPath) {
- oldPath = location.pathname
13
+ const newPath = getVideoPath()
14
+ if (newPath !== oldPath) {
15
+ oldPath = newPath
16
mountComponent(config.bilibili, userConfig)
17
}
18
0 commit comments