-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
VideoPlayer.tsx: Don't newline subtitles. (Help yomitan get the entire subtitle) #474
VideoPlayer.tsx: Don't newline subtitles. (Help yomitan get the entire subtitle) #474
Conversation
Have you tried fixing this problem using the regex-based text replacement feature instead? About the extension and locally-hosted asbplayer website - prod versions of the extension (like from Chrome web store) do not recognize localhost due to restrictions on the webstore. You can build a dev version of the extension instead if you want it to work with a locally-hosted asbplayer website. |
Okay I see your point. |
Sure! Also don't want to pressure anything! |
@@ -164,7 +164,9 @@ const showingSubtitleHtml = ( | |||
`; | |||
} | |||
|
|||
return `<span style="${subtitleStyles}" class="${subtitleClasses}">${subtitle.text}</span>`; | |||
const lines = subtitle.text.split('\n'); |
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.
This change should be repeated on line 198 to get the same behavior when DOM caching is disabled.
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.
ef802f3
to
8116d67
Compare
8116d67
to
2b3a53e
Compare
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.
It looks like there's a bug: multiple subtitle tracks are rendered with extra space between them now.
Do you have a subtitle file i could try out and see? |
…ith pre-cache subtitle dom + multiple sub track)
seems to do it edit: nvm it makes it into 1 long subtitle |
…nder the sub box (material ui css stuff)
Can you run Prettier on VideoPlayer.tsx? I can merge after that. |
Thanks! |
Related to the issue i had, after still struggling and not being able to do anything with yomitan, i decided to just fix it here.
#459 (comment)
Works!