Fixed AnonymousOverflow redirection bug https://codeberg.org/LibRedirect/browser_extension/issues/114
This commit is contained in:
parent
f48a74c32c
commit
62d10a2d0c
|
@ -375,7 +375,7 @@ function redirect(url, type, initiator, forceRedirection) {
|
|||
}
|
||||
case "anonymousOverflow": {
|
||||
if (url.hostname == "stackoverflow.com") {
|
||||
const threadID = /\/(\d+)\/?$/.exec(url.pathname)
|
||||
const threadID = /^\/a\/(\d+)\/?/.exec(url.pathname)
|
||||
if (threadID) return `${randomInstance}/questions/${threadID[1]}${url.search}`
|
||||
return `${randomInstance}${url.pathname}${url.search}`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue