mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-07-03 13:09:07 +08:00
fix: bilibili reload (#603)
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import { cropText } from '../../../utils'
|
||||
import { cropText, waitForElementToExistAndSelect } from '../../../utils'
|
||||
import { config } from '../index.mjs'
|
||||
|
||||
export default {
|
||||
init: async (hostname, userConfig, getInput, mountComponent) => {
|
||||
try {
|
||||
// B站页面是SSR的,如果插入过早,页面 js 检测到实际 Dom 和期望 Dom 不一致,会导致重新渲染
|
||||
await waitForElementToExistAndSelect('img.bili-avatar-img')
|
||||
let oldUrl = location.href
|
||||
const checkUrlChange = async () => {
|
||||
if (location.href !== oldUrl) {
|
||||
|
||||
Reference in New Issue
Block a user