-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add plugin: Search in english #8
base: main
Are you sure you want to change the base?
Conversation
}), | ||
new EditFunction(Search.prototype, "perform").load(str => { | ||
return plugins.strReplace(str, `return a[1] ? score1 : -Infinity`, | ||
`return a[1] ? score1 : a[2] ? -9999 : -Infinity` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also on this line, I just return -9999 value if english title is found.
It's a little silly, but it just works right now. Maybe need changed,,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also add Show Search Result In English
Plugins to show english results in search songs.
I want to make it as an Search in english
's option, but taiko-web
doesn't reload script after changing option (to inject scripts), so I made it an independent script.
I changed it to option, also add search results
option for https://github.com/bui/taiko-web/issues/485.
838c225
to
e5382b3
Compare
Now we can search in English names
Maybe available todos..
https://github.com/bui/taiko-web/blob/c24b121677d3770e8c7d8c704445fa4f1aa9bfc3/public/src/js/search.js#L102-L172
In these line taiko web supports much search tags but there is no manual about them. (They only shows up on little tooltip on search, but it seems unhelpful. Related issues.
Maybe we can add option on DOM about filtering and make easy to filter songs...