注入优化

This commit is contained in:
IndieKKY
2024-10-04 12:49:25 +08:00
parent abb97813d1
commit 125996408e

View File

@@ -7,6 +7,12 @@ const debug = (...args: any[]) => {
} }
(function () { (function () {
// 如果路径不是/video或/list则不注入
if (!location.pathname.startsWith('/video') && !location.pathname.startsWith('/list')) {
debug('Not inject')
return
}
const runtime: { const runtime: {
postMessageToApp?: (method: string, payload: PostMessagePayload) => Promise<PostMessageResponse> postMessageToApp?: (method: string, payload: PostMessagePayload) => Promise<PostMessageResponse>
// lastV?: string | null // lastV?: string | null