@@ -553,7 +553,13 @@ function createRoundHistogram(runs, canvasId) {
553553 scales : {
554554 x : {
555555 stacked : true ,
556- ...axisOptions
556+ ...axisOptions ,
557+ title : {
558+ display : true ,
559+ text : 'Round reached' ,
560+ color : themeColors . text ,
561+ font : { size : 12 }
562+ }
557563 } ,
558564 y : {
559565 stacked : true ,
@@ -563,6 +569,12 @@ function createRoundHistogram(runs, canvasId) {
563569 ...axisOptions . ticks ,
564570 precision : 0 ,
565571 stepSize : 1
572+ } ,
573+ title : {
574+ display : true ,
575+ text : 'Count' ,
576+ color : themeColors . text ,
577+ font : { size : 12 }
566578 }
567579 }
568580 }
@@ -657,7 +669,14 @@ function createPerformanceBarChart(entries) {
657669 y : {
658670 beginAtZero : true ,
659671 max : yAxisMax ,
660- ...axisOptions
672+ ...axisOptions ,
673+ title : {
674+ display : true ,
675+ text : 'Average round' ,
676+ color : themePalette . text ,
677+ font : { size : 14 } ,
678+ padding : { bottom : 10 }
679+ }
661680 }
662681 } ,
663682 elements : {
@@ -1232,6 +1251,33 @@ async function loadLeaderboard(leaderboardPath, detailBasePath, displayMode = 'm
12321251}
12331252
12341253// Load data when page loads
1254+
1255+ // ============================================================================
1256+ // Twitch Stream - Show only when live
1257+ // ============================================================================
1258+
1259+ function initTwitchPlayer ( ) {
1260+ const container = document . getElementById ( 'twitch-stream-container' ) ;
1261+ if ( ! container || typeof Twitch === 'undefined' ) return ;
1262+
1263+ const player = new Twitch . Player ( 'twitch-player' , {
1264+ channel : 'S1M0N38' ,
1265+ width : '100%' ,
1266+ height : '100%' ,
1267+ parent : [ 'balatrobench.com' , 'localhost' ] ,
1268+ muted : true ,
1269+ autoplay : true ,
1270+ } ) ;
1271+
1272+ player . addEventListener ( Twitch . Player . ONLINE , ( ) => {
1273+ container . classList . remove ( 'hidden' ) ;
1274+ } ) ;
1275+
1276+ player . addEventListener ( Twitch . Player . OFFLINE , ( ) => {
1277+ container . classList . add ( 'hidden' ) ;
1278+ } ) ;
1279+ }
1280+
12351281document . addEventListener ( 'DOMContentLoaded' , ( ) => {
12361282 // Detect page type
12371283 PAGE_TYPE = detectPageType ( ) ;
@@ -1241,6 +1287,9 @@ document.addEventListener('DOMContentLoaded', () => {
12411287
12421288 // Initialize quotes rotation (if on a page with quotes)
12431289 initQuotesRotation ( ) ;
1290+
1291+ // Initialize Twitch player (show only when live)
1292+ initTwitchPlayer ( ) ;
12441293} ) ;
12451294
12461295// ============================================================================
0 commit comments