Skip to content

Commit

Permalink
fix: handle x.com url
Browse files Browse the repository at this point in the history
  • Loading branch information
yjl9903 committed Feb 3, 2024
1 parent ce0d399 commit c1998ee
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/BangumiResult.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ function inferTwitter(person: PersonInformation) {
if (name.startsWith(twitterURL)) {
return '@' + name.slice(twitterURL.length);
}
const xURL = `https://x.com/`;
if (name.startsWith(xURL)) {
return '@' + name.slice(xURL.length);
}
if (name.startsWith('@')) {
return name;
}
Expand Down Expand Up @@ -120,7 +124,7 @@ function inferTwitter(person: PersonInformation) {
class="text-blue-400 hover:text-blue-500 hover:underline"
>Bangumi 番组计划</a
>
的搜索结果中的第一条结果
搜索结果第一页中的标题最相似的一个条目
</div>
<div>
需要进一步搜索,<a
Expand Down

0 comments on commit c1998ee

Please sign in to comment.