From 659e859af6dd2f61bb714fe8a955ca022bf13dc9 Mon Sep 17 00:00:00 2001 From: Hakadao Date: Sun, 26 Jan 2025 04:16:34 +0800 Subject: [PATCH] fix: cannot adapted another watcher later url (#1286) close #1286 --- src/components/TopBar/TopBar.vue | 2 +- src/contentScripts/index.ts | 1 + src/styles/adaptedStyles/index.ts | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/TopBar/TopBar.vue b/src/components/TopBar/TopBar.vue index d063b2a9..6e53fe63 100644 --- a/src/components/TopBar/TopBar.vue +++ b/src/components/TopBar/TopBar.vue @@ -691,7 +691,7 @@ defineExpose({ > diff --git a/src/contentScripts/index.ts b/src/contentScripts/index.ts index c9c43c96..1c49ee3d 100644 --- a/src/contentScripts/index.ts +++ b/src/contentScripts/index.ts @@ -43,6 +43,7 @@ function isSupportedPages(): boolean { || /https?:\/\/(?:www\.)?bilibili\.com\/bangumi\/play\/.*/.test(currentUrl) // watch later playlist || /https?:\/\/(?:www\.)?bilibili\.com\/list\/watchlater.*/.test(currentUrl) + || /https?:\/\/(?:www\.)?bilibili\.com\/watchlater\/list.*/.test(currentUrl) // favorite playlist || /https?:\/\/(?:www\.)?bilibili\.com\/list\/ml.*/.test(currentUrl) // search page diff --git a/src/styles/adaptedStyles/index.ts b/src/styles/adaptedStyles/index.ts index 8446475d..e062febe 100644 --- a/src/styles/adaptedStyles/index.ts +++ b/src/styles/adaptedStyles/index.ts @@ -39,7 +39,10 @@ async function setupStyles() { } // watch later page 稍候再看页 - else if (/https?:\/\/(?:www\.)?bilibili\.com\/watchlater\/#\/list.*/.test(currentUrl)) { + else if ( + /https?:\/\/(?:www\.)?bilibili\.com\/watchlater\/list.*/.test(currentUrl) + || /https?:\/\/(?:www\.)?bilibili\.com\/watchlater\/#\/list.*/.test(currentUrl) + ) { await import('./pages/watchLaterPage.scss') document.documentElement.classList.add('watchLaterPage') }