gignupg / Movie-Subtitles

A Chrome Extension to add your own subtitles almost anywhere such as Disney, Netflix, YouTube and many more!
MIT License
34 stars 8 forks source link

suggestion for font color and height of subtitles #13

Closed wonwater closed 1 year ago

wonwater commented 1 year ago

There is only green color for font and I cannot choose any other font color. Could you please make it possible to choose other font colors, specifically white and black? And also could you make it possible to move the height of subtitles?

gignupg commented 1 year ago

At the moment I don't have time to add this feature to the official extension, but you can add it yourself relatively easily as I've explained here. Hope this helps, let me know if you need help making it work!

wonwater commented 1 year ago

Could u please write the code to change color of font color? I've added ' subtitleText.style.color = 'white'; ' but it didnt work... And also the code to customize the position of text.

gignupg commented 1 year ago

Hey @wonwater, you can drag and drop the subtitles and place them anywhere you want. Just make sure "edit mode" is disabled in the settings menu. You can open the settings menu by clicking on the Movie Subtitle icon. Regarding changing the color of the subtitles, I updated the code snippet and tested it on my computer. This should be working for you now:

javascript: (function () {
    const subtitleBackground = document.getElementsByClassName('jss4')[0];
    const subtitleText = document.getElementsByClassName('jss6')[0];
    const subtitleArrows = document.getElementsByClassName('jss26');
    subtitleBackground.style.backgroundColor = 'orange';
    subtitleText.style.color= 'purple';
    subtitleArrows[0].style.color = 'purple';
    subtitleArrows[1].style.color = 'purple';
})();
wonwater commented 1 year ago

After adding the right up code, there appears only orange background without text color changing... T.T

wonwater commented 1 year ago

제목 없음

gignupg commented 1 year ago

Interesting! I see you're using Language Reactor. Other extensions such as Language Reactor might interfere. Either try disabling Language Reactor and see if that works or try updating the line with the subtitle text color to the following:

subtitleText.style.setProperty('color', 'purple', 'important');