Fix URL detection in YouTube about page
This commit is contained in:
parent
7ad527fa0c
commit
25d5aa6798
@ -452,6 +452,10 @@ function tryParseURL(urlstr: string) {
|
||||
|
||||
function tryUnwrapNestedURL(url: URL): URL {
|
||||
if (!url) return null;
|
||||
if (domainIs(url.host, 'youtube.com') && url.pathname == '/redirect') {
|
||||
const q = url.searchParams.get('q');
|
||||
if (q && !q.startsWith('http:') && !q.startsWith('https:') && q.includes('.')) return tryParseURL('http://' + q);
|
||||
}
|
||||
if (url.href.indexOf('http', 1) != -1) {
|
||||
if (url.pathname.startsWith('/intl/')) return null; // facebook language switch links
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user