File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - master
7- # - develop
7+ - develop
88 tags :
99 - " v*"
1010 pull_request :
Original file line number Diff line number Diff line change 171171 const canvas = document . getElementById ( 'canvas' ) ;
172172 const fsBtn = document . getElementById ( 'fs-btn' ) ;
173173
174+
175+ // Wait a bit for itch.io to inject their UI
176+ setTimeout ( ( ) => {
177+ // Check if itch.io's fullscreen button exists
178+ const itchFsBtn = document . querySelector ( '.icon-fullscreen' ) ||
179+ document . querySelector ( '[title*="fullscreen"]' ) ||
180+ ( window . self !== window . top ) ;
181+
182+ if ( itchFsBtn || window . self !== window . top ) {
183+ fsBtn . style . display = 'none' ;
184+ console . log ( "itch.io detected - hiding custom fullscreen button" ) ;
185+ }
186+ } , 500 ) ;
187+
188+
174189 // Define your game's aspect ratio (adjust these values to match your game)
175190 const GAME_WIDTH = 640 ;
176191 const GAME_HEIGHT = 480 ;
You can’t perform that action at this time.
0 commit comments