Added AnonymousOverflow reverse

このコミットが含まれているのは:
ManeraKai 2023-06-01 12:46:00 +03:00
コミット 362f6e7546
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 5ABC31FFD562E337
1個のファイルの変更10行の追加0行の削除

ファイルの表示

@ -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
}