@@ -177,56 +177,37 @@ const SyncedLyricsPage = react.memo(({ lyrics = [], provider, copyright, isKara
177
177
return react . createElement (
178
178
"div" ,
179
179
{
180
- className : "lyrics-lyricsContainer-LyricsLineContainer" ,
181
- key : i ,
182
- } ,
183
- react . createElement (
184
- "p" ,
185
- {
186
- className,
187
- style : {
188
- cursor : "pointer" ,
189
- "--position-index" : animationIndex ,
190
- "--animation-index" : ( animationIndex < 0 ? 0 : animationIndex ) + 1 ,
191
- "--blur-index" : Math . abs ( animationIndex ) ,
192
- } ,
193
- key : lineNumber ,
194
- dir : "auto" ,
195
- ref,
196
- onClick : ( event ) => {
197
- if ( startTime ) {
198
- Spicetify . Player . seek ( startTime ) ;
199
- }
200
- } ,
201
- onContextMenu : ( event ) => {
202
- event . preventDefault ( ) ;
203
- Spicetify . Platform . ClipboardAPI . copy ( rawLyrics )
204
- . then ( ( ) => Spicetify . showNotification ( "Lyrics copied to clipboard" ) )
205
- . catch ( ( ) => Spicetify . showNotification ( "Failed to copy lyrics to clipboard" ) ) ;
206
- } ,
180
+ className,
181
+ style : {
182
+ cursor : "pointer" ,
183
+ "--position-index" : animationIndex ,
184
+ "--animation-index" : ( animationIndex < 0 ? 0 : animationIndex ) + 1 ,
185
+ "--blur-index" : Math . abs ( animationIndex ) ,
186
+ } ,
187
+ dir : "auto" ,
188
+ ref,
189
+ key : lineNumber ,
190
+ onClick : ( event ) => {
191
+ if ( startTime ) {
192
+ Spicetify . Player . seek ( startTime ) ;
193
+ }
194
+ } ,
195
+ onContextMenu : ( event ) => {
196
+ event . preventDefault ( ) ;
197
+ Spicetify . Platform . ClipboardAPI . copy ( rawLyrics )
198
+ . then ( ( ) => Spicetify . showNotification ( "Lyrics copied to clipboard" ) )
199
+ . catch ( ( ) => Spicetify . showNotification ( "Failed to copy lyrics to clipboard" ) ) ;
207
200
} ,
208
- ! isKara ? lineText : react . createElement ( KaraokeLine , { text , startTime , position , isActive } )
209
- ) ,
201
+ } ,
202
+ react . createElement ( "p" , { } , ! isKara ? lineText : react . createElement ( KaraokeLine , { text , startTime , position , isActive } ) ) ,
210
203
showTranslatedBelow &&
211
204
originalText &&
212
205
originalText !== text &&
213
206
react . createElement (
214
207
"p" ,
215
208
{
216
- className,
217
209
style : {
218
210
opacity : 0.5 ,
219
- cursor : "pointer" ,
220
- "--position-index" : animationIndex ,
221
- "--animation-index" : ( animationIndex < 0 ? 0 : animationIndex ) + 1 ,
222
- "--blur-index" : Math . abs ( animationIndex ) ,
223
- } ,
224
- dir : "auto" ,
225
- ref,
226
- onClick : ( event ) => {
227
- if ( startTime ) {
228
- Spicetify . Player . seek ( startTime ) ;
229
- }
230
211
} ,
231
212
} ,
232
213
text
@@ -464,47 +445,33 @@ const SyncedExpandedLyricsPage = react.memo(({ lyrics, provider, copyright, isKa
464
445
return react . createElement (
465
446
"div" ,
466
447
{
467
- className : " lyrics-lyricsContainer-LyricsLineContainer" ,
448
+ className : `lyrics-lyricsContainer-LyricsLine ${ i <= activeLineIndex ? " lyrics-lyricsContainer-LyricsLine-active" : "" } ` ,
468
449
key : i ,
469
- } ,
470
- react . createElement (
471
- "p" ,
472
- {
473
- className : `lyrics-lyricsContainer-LyricsLine${ i <= activeLineIndex ? " lyrics-lyricsContainer-LyricsLine-active" : "" } ` ,
474
- style : {
475
- cursor : "pointer" ,
476
- } ,
477
- dir : "auto" ,
478
- ref : isActive ? activeLineRef : null ,
479
- onClick : ( event ) => {
480
- if ( startTime ) {
481
- Spicetify . Player . seek ( startTime ) ;
482
- }
483
- } ,
484
- onContextMenu : ( event ) => {
485
- event . preventDefault ( ) ;
486
- Spicetify . Platform . ClipboardAPI . copy ( rawLyrics )
487
- . then ( ( ) => Spicetify . showNotification ( "Lyrics copied to clipboard" ) )
488
- . catch ( ( ) => Spicetify . showNotification ( "Failed to copy lyrics to clipboard" ) ) ;
489
- } ,
450
+ style : {
451
+ cursor : "pointer" ,
490
452
} ,
491
- ! isKara ? lineText : react . createElement ( KaraokeLine , { text, startTime, position, isActive } )
492
- ) ,
453
+ dir : "auto" ,
454
+ ref : isActive ? activeLineRef : null ,
455
+ onClick : ( event ) => {
456
+ if ( startTime ) {
457
+ Spicetify . Player . seek ( startTime ) ;
458
+ }
459
+ } ,
460
+ onContextMenu : ( event ) => {
461
+ event . preventDefault ( ) ;
462
+ Spicetify . Platform . ClipboardAPI . copy ( rawLyrics )
463
+ . then ( ( ) => Spicetify . showNotification ( "Lyrics copied to clipboard" ) )
464
+ . catch ( ( ) => Spicetify . showNotification ( "Failed to copy lyrics to clipboard" ) ) ;
465
+ } ,
466
+ } ,
467
+ react . createElement ( "p" , { } , ! isKara ? lineText : react . createElement ( KaraokeLine , { text, startTime, position, isActive } ) ) ,
493
468
showTranslatedBelow &&
494
469
originalText &&
495
470
originalText !== text &&
496
471
react . createElement (
497
472
"p" ,
498
473
{
499
- className : `lyrics-lyricsContainer-LyricsLine${ i <= activeLineIndex ? " lyrics-lyricsContainer-LyricsLine-active" : "" } ` ,
500
- style : { opacity : 0.5 , cursor : "pointer" } ,
501
- dir : "auto" ,
502
- ref : isActive ? activeLineRef : null ,
503
- onClick : ( event ) => {
504
- if ( startTime ) {
505
- Spicetify . Player . seek ( startTime ) ;
506
- }
507
- } ,
474
+ style : { opacity : 0.5 } ,
508
475
} ,
509
476
text
510
477
)
@@ -541,32 +508,24 @@ const UnsyncedLyricsPage = react.memo(({ lyrics, provider, copyright }) => {
541
508
return react . createElement (
542
509
"div" ,
543
510
{
544
- className : "lyrics-lyricsContainer-LyricsLineContainer " ,
511
+ className : "lyrics-lyricsContainer-LyricsLine lyrics-lyricsContainer-LyricsLine-active " ,
545
512
key : index ,
546
- } ,
547
- react . createElement (
548
- "p" ,
549
- {
550
- className : "lyrics-lyricsContainer-LyricsLine lyrics-lyricsContainer-LyricsLine-active" ,
551
- dir : "auto" ,
552
- onContextMenu : ( event ) => {
553
- event . preventDefault ( ) ;
554
- Spicetify . Platform . ClipboardAPI . copy ( rawLyrics )
555
- . then ( ( ) => Spicetify . showNotification ( "Lyrics copied to clipboard" ) )
556
- . catch ( ( ) => Spicetify . showNotification ( "Failed to copy lyrics to clipboard" ) ) ;
557
- } ,
513
+ dir : "auto" ,
514
+ onContextMenu : ( event ) => {
515
+ event . preventDefault ( ) ;
516
+ Spicetify . Platform . ClipboardAPI . copy ( rawLyrics )
517
+ . then ( ( ) => Spicetify . showNotification ( "Lyrics copied to clipboard" ) )
518
+ . catch ( ( ) => Spicetify . showNotification ( "Failed to copy lyrics to clipboard" ) ) ;
558
519
} ,
559
- lineText
560
- ) ,
520
+ } ,
521
+ react . createElement ( "p" , { } , lineText ) ,
561
522
showTranslatedBelow &&
562
523
originalText &&
563
524
originalText !== text &&
564
525
react . createElement (
565
526
"p" ,
566
527
{
567
- className : "lyrics-lyricsContainer-LyricsLine lyrics-lyricsContainer-LyricsLine-active" ,
568
528
style : { opacity : 0.5 } ,
569
- dir : "auto" ,
570
529
} ,
571
530
text
572
531
)
0 commit comments