@@ -23,7 +23,7 @@ if (userConfig.year == '2011') {
23
23
// false = isn't installed
24
24
// true = is installed
25
25
var isProjectV3 = false ;
26
- if ( document . querySelector ( '.v3#vor_debugger_container ' ) ) {
26
+ if ( document . querySelector ( '.spitfire-body-container.v3 ' ) ) {
27
27
isProjectV3 = true ;
28
28
console . log ( 'Project V3 detected' ) ;
29
29
// Add the "forv3.css" file
@@ -303,89 +303,89 @@ async function enableCustomTheme() {
303
303
`
304
304
} if ( userConfig . scrubberIcon !== null ) {
305
305
outputCssCustomTheme += `
306
- #container .ytp-scrubber-button {
306
+ ${ elementNames [ ' #container' ] } ${ elementNames [ ' .ytp-scrubber-button' ] } {
307
307
background: url(${ userConfig . scrubberIcon } ) no-repeat center !important;
308
308
border-radius: 0 !important;
309
309
}
310
310
`
311
311
} if ( userConfig . scrubberIconHover == null && userConfig . scrubberIcon !== null ) {
312
312
outputCssCustomTheme += `
313
- #container .ytp-scrubber-button:hover {
313
+ ${ elementNames [ ' #container' ] } ${ elementNames [ ' .ytp-scrubber-button' ] } :hover {
314
314
background: url(${ userConfig . scrubberIcon } ) no-repeat center !important;
315
315
border-radius: 0 !important;
316
316
}
317
317
`
318
318
} if ( userConfig . scrubberIconHover !== null ) {
319
319
outputCssCustomTheme += `
320
- #container .ytp-scrubber-button:hover {
320
+ ${ elementNames [ ' #container' ] } ${ elementNames [ ' .ytp-scrubber-button' ] } :hover {
321
321
background: url(${ userConfig . scrubberIconHover } ) no-repeat center !important;
322
322
border-radius: 0 !important;
323
323
}
324
324
`
325
325
} if ( userConfig . scrubberPosition !== null ) {
326
326
outputCssCustomTheme += `
327
- #container .ytp-scrubber-button {
327
+ ${ elementNames [ ' #container' ] } ${ elementNames [ ' .ytp-scrubber-button' ] } {
328
328
background-position: ${ userConfig . scrubberPosition } !important;
329
329
}
330
330
`
331
331
} if ( userConfig . scrubberSize !== null ) {
332
332
outputCssCustomTheme += `
333
- #container .ytp-scrubber-button {
333
+ ${ elementNames [ ' #container' ] } ${ elementNames [ ' .ytp-scrubber-button' ] } {
334
334
background-size: ${ userConfig . scrubberSize } px !important;
335
335
}
336
- #container .ytp-scrubber-button:hover {
336
+ ${ elementNames [ ' #container' ] } ${ elementNames [ ' .ytp-scrubber-button' ] } :hover {
337
337
background-size: ${ userConfig . scrubberSize } px !important;
338
338
}
339
339
`
340
340
} if ( userConfig . scrubberHeight !== null ) {
341
341
outputCssCustomTheme += `
342
342
/* default */
343
- #container .ytp-scrubber-button {
343
+ ${ elementNames [ ' #container' ] } ${ elementNames [ ' .ytp-scrubber-button' ] } {
344
344
height: ${ userConfig . scrubberHeight } px !important;
345
345
}
346
- #container .ytp-scrubber-button:hover {
346
+ ${ elementNames [ ' #container' ] } ${ elementNames [ ' .ytp-scrubber-button' ] } :hover {
347
347
height: ${ userConfig . scrubberHeight } px !important;
348
348
}
349
349
`
350
350
} if ( userConfig . scrubberWidth !== null ) {
351
351
outputCssCustomTheme += `
352
352
/* default */
353
- #container .ytp-scrubber-button {
353
+ ${ elementNames [ ' #container' ] } ${ elementNames [ ' .ytp-scrubber-button' ] } {
354
354
width: ${ userConfig . scrubberWidth } px !important;
355
355
}
356
- #container .ytp-scrubber-button:hover {
356
+ ${ elementNames [ ' #container' ] } ${ elementNames [ ' .ytp-scrubber-button' ] } :hover {
357
357
width: ${ userConfig . scrubberWidth } px !important;
358
358
}
359
359
`
360
360
} if ( userConfig . scrubberWidth == null && userConfig . scrubberHeight !== null ) {
361
361
outputCssCustomTheme += `
362
362
/* default */
363
- #container .ytp-scrubber-button {
363
+ ${ elementNames [ ' #container' ] } ${ elementNames [ ' .ytp-scrubber-button' ] } {
364
364
width: ${ userConfig . scrubberHeight } px !important;
365
365
}
366
- #container .ytp-scrubber-button:hover {
366
+ ${ elementNames [ ' #container' ] } ${ elementNames [ ' .ytp-scrubber-button' ] } :hover {
367
367
width: ${ userConfig . scrubberHeight } px !important;
368
368
}
369
369
`
370
370
} if ( userConfig . scrubberWidth !== null && userConfig . scrubberHeight == null ) {
371
371
outputCssCustomTheme += `
372
372
/* default */
373
- #container .ytp-scrubber-button {
373
+ ${ elementNames [ ' #container' ] } ${ elementNames [ ' .ytp-scrubber-button' ] } {
374
374
height: ${ userConfig . scrubberWidth } px !important;
375
375
}
376
- #container .ytp-scrubber-button:hover {
376
+ ${ elementNames [ ' #container' ] } ${ elementNames [ ' .ytp-scrubber-button' ] } :hover {
377
377
height: ${ userConfig . scrubberWidth } px !important;
378
378
}
379
379
`
380
380
} if ( userConfig . scrubberTop !== null ) {
381
381
outputCssCustomTheme += `
382
- #container .ytp-scrubber-container {
382
+ ${ elementNames [ ' #container' ] } ${ elementNames [ ' .ytp-scrubber-container' ] } {
383
383
top: ${ userConfig . scrubberTop } px !important;
384
384
}
385
385
`
386
386
} if ( userConfig . scrubberLeft !== null ) {
387
387
outputCssCustomTheme += `
388
- #container .ytp-scrubber-container {
388
+ ${ elementNames [ ' #container' ] } ${ elementNames [ ' .ytp-scrubber-container' ] } {
389
389
left: ${ userConfig . scrubberLeft } px !important;
390
390
}
391
391
`
@@ -770,11 +770,11 @@ function startPlayer() {
770
770
var CustomThemeCss2010 = `
771
771
/* someother custom theme stuff for 2010 */
772
772
773
- #container .ytp-chrome-controls {
773
+ ${ elementNames [ ' #container' ] } .ytp-chrome-controls {
774
774
border-top: solid 2px #d1d1d180 !important;
775
775
}
776
776
777
- #container .ytp-chrome-bottom .ytp-left-controls:before {
777
+ ${ elementNames [ ' #container' ] } .ytp-chrome-bottom .ytp-left-controls:before {
778
778
position: absolute;
779
779
content: "";
780
780
height: 100%;
@@ -783,24 +783,24 @@ function startPlayer() {
783
783
background: linear-gradient(rgb(0 0 0 / 17.5%), rgb(255 255 255 / 0%));
784
784
}
785
785
786
- #container .ytp-chrome-bottom .ytp-right-controls:before {
786
+ ${ elementNames [ ' #container' ] } .ytp-chrome-bottom .ytp-right-controls:before {
787
787
position: absolute;
788
788
content: "";
789
789
height: 100%;
790
790
width: 60%;
791
791
background: linear-gradient(rgb(0 0 0 / 17.5%), rgb(255 255 255 / 0%));
792
792
}
793
793
794
- #container .ytp-chrome-bottom .ytp-button {
794
+ ${ elementNames [ ' #container' ] } .ytp-chrome-bottom .ytp-button {
795
795
border: solid 1px rgb(255 255 255 / 35%);
796
796
background: linear-gradient(rgb(255 255 255 / 35%), rgb(0 0 0 / 35%)) !important;
797
797
}
798
798
799
799
/* igrone background & border for the following: */
800
- #container .ytp-chrome-bottom .ytp-button.ytp-settings-button,
801
- #container .ytp-chrome-bottom .ytp-button.ytp-subtitles-button,
802
- #container .ytp-chrome-bottom .ytp-button[data-tooltip-target-id="ytp-autonav-toggle-button"],
803
- #container .ytp-chrome-bottom .ytp-chapter-title.ytp-button
800
+ ${ elementNames [ ' #container' ] } .ytp-chrome-bottom .ytp-button.ytp-settings-button,
801
+ ${ elementNames [ ' #container' ] } .ytp-chrome-bottom .ytp-button.ytp-subtitles-button,
802
+ ${ elementNames [ ' #container' ] } .ytp-chrome-bottom .ytp-button[data-tooltip-target-id="ytp-autonav-toggle-button"],
803
+ ${ elementNames [ ' #container' ] } .ytp-chrome-bottom .ytp-chapter-title.ytp-button
804
804
{
805
805
background: none !important;
806
806
border: none !important;
0 commit comments