Merge pull request #81 from DeepDoge/1.7.6

[BUG FIX]  ctxFromUrl pathname check fixed
This commit is contained in:
kodxana 2022-01-07 21:54:43 +01:00 committed by GitHub
commit 668018d89d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);