Skip to content

Commit

Permalink
Added new path to libremdb #818
Browse files Browse the repository at this point in the history
  • Loading branch information
ManeraKai committed Sep 9, 2023
1 parent 84c363d commit 413b3c6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/assets/javascripts/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,14 @@ function redirect(url, type, initiator, forceRedirection) {
}
return `${randomInstance}${url.pathname}${url.search}`
}
case "libremdb": {
if (url.pathname.startsWith("/Name")) {
for (const [key, value] of url.searchParams.entries()) {
return `${randomInstance}/title/${encodeURIComponent(key)}`
}
}
return `${randomInstance}${url.pathname}${url.search}`
}
default: {
return `${randomInstance}${url.pathname}${url.search}`
}
Expand Down

0 comments on commit 413b3c6

Please sign in to comment.