From f73e204bd29c98e7603244da216c60be00372bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Arda=20Kavakc=C4=B1?= <42360077+dybdeskarphet@users.noreply.github.com> Date: Fri, 13 May 2022 17:36:11 +0000 Subject: [PATCH] Fix replace command for IGTV path (#259) --- src/assets/javascripts/helpers/instagram.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/javascripts/helpers/instagram.js b/src/assets/javascripts/helpers/instagram.js index 13c4d3d..ca6097d 100644 --- a/src/assets/javascripts/helpers/instagram.js +++ b/src/assets/javascripts/helpers/instagram.js @@ -79,7 +79,7 @@ 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.replace('/reel', '')}${url.search}`; + return `${randomInstance}/p${url.pathname.replace(/\/reel|\/tv/i, '')}${url.search}`; else return `${randomInstance}/u${url.pathname}${url.search}`; // Likely a user profile, redirect to '/u/...' }