Added AnonymousOverflow reverse

This commit is contained in:
ManeraKai 2023-06-01 12:46:00 +03:00
parent 57a664afe1
commit 362f6e7546
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
1 changed files with 10 additions and 0 deletions

View File

@ -642,6 +642,16 @@ async function reverse(url) {
}
return `https://wikipedia.org${url.pathname}${url.search}${url.hash}`
}
case "stackOverflow": {
if (url.pathname.startsWith("/questions/")) {
return `https://stackoverflow.com${url.pathname}${url.search}`
}
if (url.pathname.startsWith("/exchange/")) {
const regex = /\/exchange\/(.*?)(\/.*)/.exec(url.pathname)
if (regex) return `https://${regex[1]}.stackexchange.com${regex[2]}`
}
return
}
default:
return
}