@@ -15,21 +15,23 @@ export function buildShuffleButton(pageType, channelId, eventVersion, clickHandl
15
15
switch ( pageType ) {
16
16
case "channel" :
17
17
buttonDivID = "youtube-random-video-large-shuffle-button-channel" ;
18
- buttonDivExtraStyle = "margin-left: 14px;" ;
19
18
switch ( eventVersion ) {
20
19
case "default" :
21
20
buttonDivOwner = [ document . getElementById ( "channel-header" ) . querySelector ( "#inner-header-container" ) . children . namedItem ( "buttons" ) ] ;
21
+ buttonDivExtraStyle = "margin-left: 8px;" ;
22
22
break ;
23
23
case "newYTFinishEvent20240521" :
24
24
buttonDivOwner = [ document . getElementById ( "page-header" ) . querySelector ( ".page-header-view-model-wiz__page-header-headline-info" ) . getElementsByTagName ( "yt-flexible-actions-view-model" ) [ 0 ] ] ;
25
25
break ;
26
26
}
27
27
break ;
28
+ // TODO: Fix video shuffle button
28
29
case "video" :
29
30
buttonDivID = "youtube-random-video-large-shuffle-button-video" ;
30
31
buttonDivExtraStyle = "margin-left: 8px;" ;
31
32
buttonDivOwner = [ document . getElementById ( "above-the-fold" ) . children . namedItem ( "top-row" ) . children . namedItem ( "owner" ) ] ;
32
33
break ;
34
+ // TODO: Shorts seem fine, but the button has a different background color from the others
33
35
case "short" :
34
36
isLargeButton = false ;
35
37
buttonDivID = "youtube-random-video-small-shuffle-button-short" ;
@@ -43,6 +45,7 @@ export function buildShuffleButton(pageType, channelId, eventVersion, clickHandl
43
45
44
46
console . log ( buttonDivOwner ) ;
45
47
48
+ // TODO: How does this work with the new layout?
46
49
// If we are on a video page, modify the "min-width" of the two divs holding the buttons to make room for the 'Shuffle' button
47
50
// This doesn't fix them overlapping in all cases, but most times it does
48
51
if ( pageType == "video" ) {
@@ -95,6 +98,7 @@ export function buildShuffleButton(pageType, channelId, eventVersion, clickHandl
95
98
96
99
// Create the button div & renderer
97
100
let buttonDiv ;
101
+ // TODO: Check if the new styling for video page buttons is the same as for channel page buttons
98
102
if ( pageType === "channel" || pageType === "video" ) {
99
103
buttonDiv = `
100
104
<div id="${ buttonDivID } " class="style-scope ytd-c4-tabbed-header-renderer" style="align-items: center; display: flex; flex-direction: row; ${ buttonDivExtraStyle } ">
0 commit comments