Added support for /reel and /tv for instagram #144

This commit is contained in:
ManeraKai 2022-03-28 21:25:08 +03:00
parent a849fe0f4f
commit d007f595d6
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337

View File

@ -97,7 +97,6 @@ function setProtocol(val) {
}
function redirect(url, type, initiator) {
if (disable) return;
if (
initiator &&
@ -116,6 +115,8 @@ function redirect(url, type, initiator) {
if (url.pathname === "/" || reservedPaths.includes(url.pathname.split("/")[1]))
return `${randomInstance}${url.pathname}${url.search}`;
if (url.pathname.startsWith("/reel") || url.pathname.startsWith("/tv"))
return `${randomInstance}/p${url.pathname}${url.search}`;
else
return `${randomInstance}/u${url.pathname}${url.search}`; // Likely a user profile, redirect to '/u/...'
}