mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-17 22:00:00 +00:00
url: remove tumblr aliasing
not quite sure what its purpose is/was anyways (tracking id removal? it's not used anyways)
This commit is contained in:
parent
0244c40d0b
commit
3a00bc7f8d
1 changed files with 1 additions and 9 deletions
|
@ -12,7 +12,7 @@ export function aliasURL(url) {
|
|||
case "youtube":
|
||||
if (url.pathname.startsWith('/live/') || url.pathname.startsWith('/shorts/')) {
|
||||
url.pathname = '/watch';
|
||||
// ['', 'live' || 'shorts', id, ...rest]
|
||||
// parts := ['', 'live' || 'shorts', id, ...rest]
|
||||
url.search = `?v=${encodeURIComponent(parts[2])}`
|
||||
}
|
||||
break;
|
||||
|
@ -33,14 +33,6 @@ export function aliasURL(url) {
|
|||
}
|
||||
break;
|
||||
|
||||
case "tumblr":
|
||||
if (!url.pathname.includes("/blog/view")) {
|
||||
if (url.pathname.endsWith('/'))
|
||||
url.pathname = url.pathname.slice(0, -1);
|
||||
url.pathname = url.pathname.replace(parts[5], '')
|
||||
}
|
||||
break;
|
||||
|
||||
case "twitch":
|
||||
if (url.hostname === 'clips.twitch.tv' && parts.length >= 2) {
|
||||
url = new URL(`https://twitch.tv/_/clip/${parts[1]}`);
|
||||
|
|
Loading…
Reference in a new issue