Fixed Isntagram reels not redirecting https://github.com/libredirect/libredirect/issues/559
This commit is contained in:
parent
c19491edc0
commit
0d0ea9d2a4
@ -130,7 +130,8 @@ function redirect(url, type, initiator, forceRedirection) {
|
||||
case "bibliogram":
|
||||
const reservedPaths = ["u", "p", "privacy"]
|
||||
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|\/tv/i, "")}${url.search}`
|
||||
if (url.pathname.startsWith("/reel")) return `${randomInstance}${url.pathname}`
|
||||
if (url.pathname.startsWith("/tv")) return `${randomInstance}/p${url.pathname.replace(/\/tv/i, "")}${url.search}`
|
||||
else return `${randomInstance}/u${url.pathname}${url.search}` // Likely a user profile, redirect to '/u/...'
|
||||
case "lbryDesktop":
|
||||
return url.href.replace(/^https?:\/{2}odysee\.com\//, "lbry://").replace(/:(?=[a-zA-Z0-9])/g, "#")
|
||||
|
@ -140,7 +140,7 @@
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
"^https?:\\/{2}(www\\.)?instagram\\.com\\/?(p\\/|$)"
|
||||
"^https?:\\/{2}(www\\.)?instagram\\.com\\/?(p\\/|reel\\/|$)"
|
||||
],
|
||||
"name": "Instagram",
|
||||
"options": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user