From 274f012145638af322a7ea6c995618b3c9cce355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=B1=E5=BF=83?= Date: Sun, 15 May 2022 14:11:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D3.X=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E5=80=8D=E9=80=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/video/player-agent.ts | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/components/video/player-agent.ts b/src/components/video/player-agent.ts index bceae8015..79023e99a 100644 --- a/src/components/video/player-agent.ts +++ b/src/components/video/player-agent.ts @@ -453,22 +453,8 @@ export class VideoPlayerCompatAgent extends VideoPlayer2XAgent { export const playerAgent = (() => { - let agent: PlayerAgent - const querys = ['#bilibili-player', '.bilibili-player'] + if (matchCurrentPage(bangumiUrls)) { + return new BangumiPlayerAgent() + } return new VideoPlayerCompatAgent() - // return () => { - // if (agent) { - // console.log('if-agent',agent); - // return agent - // } - // if (matchCurrentPage(bangumiUrls)) { - // agent = new BangumiPlayerAgent() - // }else if ((dq(querys[0]) as HTMLElement)) { - // agent = new VideoPlayer3XAgent() - // }else if (dq(querys[1]) as HTMLElement) { - // agent = new VideoPlayer2XAgent() - // } - // console.log('end-agent',agent); - // return agent - // } })()