Skip to content

Commit

Permalink
fix(ani-buttons): fix anidb link when length of the name is one
Browse files Browse the repository at this point in the history
  • Loading branch information
rosset-nocpes committed May 18, 2024
1 parent 1b574df commit 82d9610
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main-script/scripts/ani-buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export default function aniButtons(data) {
ad:
getUrl('ad') ??
`https://anidb.net/${contentTypeMap[content_type]?.ad || content_type}/?adb.search=${
['person', 'character'].includes(content_type)
['person', 'character'].includes(content_type) &&
title.split(' ').length == 2
? `${title.split(' ')[1]} ${title.split(' ')[0]}`
: title
}&do.search=1`,
Expand Down

0 comments on commit 82d9610

Please sign in to comment.