INNER CODE UNIT · JavaScript
switchNamespace
lucky-sideburn/kubeinvaders · html/js/game_console.js:139
function switchNamespace() {
if (namespaces_index < namespaces.length - 1) {
namespaces_index += 1;
}
else {
namespaces_index = 0;
}
namespace = namespaces[namespaces_index];
$('#currentGameNamespace').text(namespace);
$('#alert_placeholder').replaceWith(alert_div + 'Latest action: Change target namespace to ' + namespace + '</div>');
aliens = [];
pods = [];
}
function createChaosProgramButton(name, lang) {
let btn = document.createElement("button");
let capitalizedName = name.charAt(0).toUpperCase() + name.slice(1);
console.log("[CREATE-CHAOS-PROGRAM] Creating button for " + name);