Skip to content

Commit d007f59

Browse files
committed
Added support for /reel and /tv for instagram #144
1 parent a849fe0 commit d007f59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/assets/javascripts/helpers/instagram.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ function setProtocol(val) {
9797
}
9898

9999
function redirect(url, type, initiator) {
100-
101100
if (disable) return;
102101
if (
103102
initiator &&
@@ -116,6 +115,8 @@ function redirect(url, type, initiator) {
116115

117116
if (url.pathname === "/" || reservedPaths.includes(url.pathname.split("/")[1]))
118117
return `${randomInstance}${url.pathname}${url.search}`;
118+
if (url.pathname.startsWith("/reel") || url.pathname.startsWith("/tv"))
119+
return `${randomInstance}/p${url.pathname}${url.search}`;
119120
else
120121
return `${randomInstance}/u${url.pathname}${url.search}`; // Likely a user profile, redirect to '/u/...'
121122
}

0 commit comments

Comments
 (0)