🥡bug fix

- ctxFromUrl pathname check fixed
This commit is contained in:
Shiba 2022-01-07 20:40:36 +00:00
parent 75274005ee
commit 2b3d43e0dc

View file

@ -23,8 +23,7 @@ async function ctxFromURL(href: string): Promise<UpdateContext | void> {
const url = new URL(href);
if (!getSourcePlatfromSettingsFromHostname(url.hostname)) return
if (url.pathname.startsWith('/watch?')) return
if (url.pathname.startsWith('/channel?')) return
if (!(url.pathname.startsWith('/watch') || url.pathname.startsWith('/channel'))) return
const { redirect, targetPlatform } = await getExtensionSettingsAsync('redirect', 'targetPlatform');
const descriptor = ytService.getId(href);