From 125996408e346ded2a48c4f9ac26ba3efaae551a Mon Sep 17 00:00:00 2001 From: IndieKKY Date: Fri, 4 Oct 2024 12:49:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E5=85=A5=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/inject/inject.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/inject/inject.ts b/src/inject/inject.ts index 4dee7db..6817496 100644 --- a/src/inject/inject.ts +++ b/src/inject/inject.ts @@ -7,6 +7,12 @@ const debug = (...args: any[]) => { } (function () { + // 如果路径不是/video或/list,则不注入 + if (!location.pathname.startsWith('/video') && !location.pathname.startsWith('/list')) { + debug('Not inject') + return + } + const runtime: { postMessageToApp?: (method: string, payload: PostMessagePayload) => Promise // lastV?: string | null