-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Add ability to view video transcripts to the Invidious frontend #5298
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
base: master
Are you sure you want to change the base?
Conversation
This commit adds a server-side UI template that renders a transcript element. This is used to render transcripts for users without JS.
Innertube structure was changed
|
||
addEventListener("DOMContentLoaded", () => { | ||
const transcriptLines = document.getElementById("lines"); | ||
for (const transcriptLine of transcriptLines.children) { |
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'd recommend adding the click event listener on transcriptLines and checking the event's target. This would have better performance than adding an event listener onto each transcriptLine
@@ -195,3 +195,15 @@ addEventListener('load', function (e) { | |||
comments.innerHTML = ''; | |||
} | |||
}); | |||
|
|||
addEventListener("DOMContentLoaded", () => { |
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 don't remember if internet explorer is still a supported browser or not but arrow functions aren't supported in IE. So if it is still supported it will need to be changed. https://caniuse.com/arrow-functions
addEventListener("DOMContentLoaded", () => { | |
addEventListener("DOMContentLoaded", function() { |
margin: 0; | ||
} | ||
|
||
.transcript-line:hover, .selected.transcript-line, .transcript-title-line:hover, .selected.transcript-title-line { |
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.
Hovering looks great on light mode, but it doesn't look great on dark mode (the default used by invidious).
.transcript-line:hover, .selected.transcript-line, .transcript-title-line:hover, .selected.transcript-title-line { | |
.transcript-line:hover, .selected.transcript-line, .transcript-title-line:hover, .selected.transcript-title-line { | |
background: #4f4f4f; | |
} | |
.light-theme .transcript-line:hover, .selected.transcript-line, .transcript-title-line:hover, .selected.transcript-title-line { | |
background: #cacaca; | |
} |
With the suggestion, it now looks like this:
In testing on https://inv.nadeko.net with my CSS suggestion applied |
Closes #2564
The current description box isn't really designed to hold non preformatted content hence the extraneous spacing at the bottom. Once #4111 is merged the description box should get a redesign to better accommodate these description widgets and how they should be affected by the expand description user preference.