pxt-arcade 1.10.16 → 1.10.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/built/sim.js CHANGED
@@ -226,6 +226,15 @@ var pxsim;
226
226
  }
227
227
  }
228
228
  };
229
+ window.onload = function (e) {
230
+ const url = new URL(document.location.toString());
231
+ if (url.searchParams.get("hideSimButtons") === "1") {
232
+ const gamePlayer = document.getElementsByClassName("game-player");
233
+ if (gamePlayer && gamePlayer.length) {
234
+ document.getElementsByClassName("game-player")[0].classList.add('just-screen');
235
+ }
236
+ }
237
+ };
229
238
  window.addEventListener("message", ev => {
230
239
  if (ev.data.button !== undefined) {
231
240
  let key;
@@ -416,12 +425,6 @@ var pxsim;
416
425
  if (this.runOptions.options.mpRole) {
417
426
  this.multiplayerState.init(this.runOptions.options.mpRole);
418
427
  }
419
- if (this.runOptions.options.hideSimButtons) {
420
- const gamePlayer = document.getElementsByClassName("game-player");
421
- if (gamePlayer && gamePlayer.length) {
422
- gamePlayer[0].classList.add('just-screen');
423
- }
424
- }
425
428
  }
426
429
  this.updateStats();
427
430
  return Promise.resolve();