File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 < title > About - BalatroBench</ title >
88 < script src ="https://cdn.tailwindcss.com "> </ script >
99 < script src ="https://cdn.jsdelivr.net/npm/chart.js "> </ script >
10+ < script src ="config.js "> </ script >
1011 < script src ="script.js "> </ script >
1112 <!-- Theme-aware favicon -->
1213 < link rel ="icon " href ="favicon.svg " type ="image/svg+xml ">
Original file line number Diff line number Diff line change 77 < title > BalatroBench Community</ title >
88 < script src ="https://cdn.tailwindcss.com "> </ script >
99 < script src ="https://cdn.jsdelivr.net/npm/chart.js "> </ script >
10+ < script src ="config.js "> </ script >
1011 < script src ="script.js "> </ script >
1112 <!-- Theme-aware favicon -->
1213 < link rel ="icon " href ="favicon.svg " type ="image/svg+xml ">
Original file line number Diff line number Diff line change 1+ /**
2+ * Configuration file for BalatroBench
3+ * Controls data source locations
4+ */
5+
6+ const CONFIG = {
7+ // Current active environment - change this to switch environments
8+ // environment: 'development',
9+ environment : 'production' ,
10+
11+ // Environment configurations
12+ environments : {
13+ development : {
14+ name : 'Development' ,
15+ data : '' // Local data - use relative paths
16+ } ,
17+ production : {
18+ name : 'Production' ,
19+ data : 'https://balatrobench.b-cdn.net' // CDN data
20+ }
21+ } ,
22+
23+ // Get current environment
24+ getCurrent ( ) {
25+ return this . environments [ this . environment ] || this . environments . development ;
26+ } ,
27+
28+ // Get data URL for current environment
29+ getData ( ) {
30+ return this . getCurrent ( ) . data ;
31+ }
32+ } ;
33+
34+ // Make CONFIG available globally
35+ window . CONFIG = CONFIG ;
Original file line number Diff line number Diff line change 77 < title > BalatroBench</ title >
88 < script src ="https://cdn.tailwindcss.com "> </ script >
99 < script src ="https://cdn.jsdelivr.net/npm/chart.js "> </ script >
10+ < script src ="config.js "> </ script >
1011 < script src ="script.js "> </ script >
1112 <!-- Theme-aware favicon -->
1213 < link rel ="icon " href ="favicon.svg " type ="image/svg+xml ">
Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ let performanceChart = null;
4141let DEFAULT_BENCHMARK_VERSION = null ; // Must be set from manifest
4242let PAGE_TYPE = null ; // 'main' or 'community'
4343
44- // Data source configuration
45- const IS_DEV = new URLSearchParams ( window . location . search ) . has ( 'dev' ) ;
46- const DATA_BASE_URL = IS_DEV ? ' ' : 'http://balatrobench.b-cdn.net' ;
44+ // Data source configuration - using CONFIG from config.js
45+ const DATA_BASE_URL = window . CONFIG ? window . CONFIG . getData ( ) : '' ;
46+ const IS_DEV = window . CONFIG ? window . CONFIG . environment === 'development ' : false ;
4747
4848// Detect which page we're on
4949function detectPageType ( ) {
You can’t perform that action at this time.
0 commit comments