Skip to content

Commit

Permalink
fix refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Dec 15, 2024
1 parent 4a8c558 commit 8b3e17f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion html5/js/kubeinvaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function setCodeNameToTextInput(elementId) {
var oReq = new XMLHttpRequest();
oReq.onreadystatechange = function () {
if (this.readyState === XMLHttpRequest.DONE && this.status === 200) {
globalState.set('codename') = this.responseText.trim();
globalState.set('codename',this.responseText.trim());
$("#" + elementId).val(globalState.get('codename'));
$("#" + elementId).text(globalState.get('codename'));
if (globalState.get('codename') == "") {
Expand Down
2 changes: 2 additions & 0 deletions html5/js/mode_controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and user interactions.

function startGameMode() {
let game_buttons = document.getElementById("game-buttons");
let game_screen = document.getElementById("game-screen");
if (globalState.get('game_mode_switch')) {
globalState.set('game_mode_switch', false);
$("#gameModeButton").text("Enable Game Mode");
Expand Down Expand Up @@ -60,6 +61,7 @@ function startGameMode() {
}

function startProgrammingMode() {
let game_screen = document.getElementById("game-screen");
kubePingModalSwitch();
if (is_demo_mode()) {
demo_mode_alert();
Expand Down

0 comments on commit 8b3e17f

Please sign in to comment.