Closed unbeatable-101 closed 4 years ago
I did look into that as an option when creating the extension. Basically, i only use CSS to change the titles, more specifically the text-transform property. Which does have the capitalise option like you described. But it doesn't work well for titles that are already all caps. It would need to first convert everything to lowercase, and then capitalise it, but it seems like there's no way to do that.
case 'capitalize_first_letter': //language=CSS styleElement.innerHTML = `
.ytp-videowall-still-info-title,
.large-media-item-metadata > a > h3 > span,
.compact-media-item-headline > span {
text-transform: lowercase;
display: block !important;
}
#video-title::first-letter,
.ytp-videowall-still-info-title::first-letter,
.large-media-item-metadata > a > h3 > span::first-letter,
.compact-media-item-headline > span::first-letter {
text-transform: uppercase;
You have this in youtube.js, what if you changed text-transform: uppercase;
to text-transform: capitalize;
?
text-transform: capitalize;
would only really do something for titles that are: 1. already all lowercase 2. already have the first letter of each word capitalised, It won't get rid of the all-caps titles.
Here's an example:
As you can see barely anything changed. Only the non-capitalised words got capitalised
I meant how you it all in lowercase and then you change it to capitalize
You can't apply two things to it unfortunately. What it does in the code you linked is only apply it to the first letter
Okay nevermind, just figured out a way to do it. with the ::first-line property, ill add it soon :) thanks for giving me the idea!
Thank you!
Added it in 0.4, doesn't work perfectly, but its alright
Could an option be added for this?