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 dcd3415 commit 6e0cf8fCopy full SHA for 6e0cf8f
src/content-script/site-adapters/bilibili/index.mjs
@@ -6,14 +6,14 @@ export default {
6
try {
7
// B站页面是SSR的,如果插入过早,页面 js 检测到实际 Dom 和期望 Dom 不一致,会导致重新渲染
8
await waitForElementToExistAndSelect('img.bili-avatar-img')
9
- let oldUrl = location.href
10
- const checkUrlChange = async () => {
11
- if (location.href !== oldUrl) {
12
- oldUrl = location.href
+ let oldPath = location.pathname
+ const checkPathChange = async () => {
+ if (location.pathname !== oldPath) {
+ oldPath = location.pathname
13
mountComponent(config.bilibili, userConfig)
14
}
15
16
- window.setInterval(checkUrlChange, 500)
+ window.setInterval(checkPathChange, 500)
17
} catch (e) {
18
/* empty */
19
0 commit comments