Skip to content

Commit

Permalink
Fixed AnonymousOverflow redirection bug https://codeberg.org/LibRedir…
Browse files Browse the repository at this point in the history
  • Loading branch information
ManeraKai committed Nov 8, 2023
1 parent f48a74c commit 62d10a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/assets/javascripts/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
}
Expand Down

0 comments on commit 62d10a2

Please sign in to comment.