@@ -31,7 +31,7 @@ function createControlsContainer(channelName) {
3131 const channelElement = createStyledElement ( 'div' , {
3232 fontSize : '15px' ,
3333 textAlign : 'center' ,
34- width : '160px '
34+ width : '180px '
3535 } ) ;
3636 channelElement . classList . add ( 'channel' ) ; // add this line
3737 channelElement . textContent = channelName ;
@@ -49,18 +49,7 @@ function createControlsContainer(channelName) {
4949 padding : '5px 10px'
5050 } ;
5151 const toggleButton = createButton ( '🔼' , 'toggle-video' , toggleButtonStyles ) ;
52-
53- const selectStyles = {
54- marginLeft : '20px' ,
55- border : '1px solid white' ,
56- borderRadius : '5px' ,
57- padding : '5px 10px' ,
58- height : '35px' ,
59- width : '150px'
60- } ;
61-
6252 controlsContainer . append ( prevButton , channelElement , nextButton , toggleButton ) ;
63-
6453 return { controlsContainer, prevButton, nextButton, toggleButton } ;
6554}
6655
@@ -94,17 +83,8 @@ function createVideoContainer(videoUrl, channelName) {
9483 return { container, iframe, prevButton, nextButton, toggleButton } ;
9584}
9685
97- interface LeetCodeProblem {
98- title : string ;
99- videos : {
100- embedded_url : string ;
101- channel : string ;
102- } [ ] ;
103- }
104-
10586/**
10687 * Injects the embedded YouTube solution into the solutions tab of the LeetCode problem.
107- * @param {string } title - The problem title.
10888 */
10989function addVideo ( title : string ) {
11090 const SOLUTIONS_TAB_INDEX = 1 ;
@@ -153,14 +133,13 @@ function addVideo(title: string) {
153133
154134 if ( iframe ) {
155135 // pause the video
156- iframe . contentWindow ?. postMessage ( '{"event":"command","func":"pauseVideo","args":""}' , '*' ) ;
157136 }
158137 }
159138 } ) ;
160139
161140 // on hover, change background color of toggleButton
162141 toggleButton ?. addEventListener ( 'mouseover' , ( ) => {
163- toggleButton . style . backgroundColor = '#fff ' ;
142+ toggleButton . style . backgroundColor = '#222 ' ;
164143 toggleButton . style . color = '#000' ;
165144 } ) ;
166145
0 commit comments