Update listener.js

Minor changes
This commit is contained in:
Andyyy7666
2021-12-24 22:30:15 +01:00
committed by GitHub
parent 1fb5fb7edf
commit 43539708fe

View File

@@ -85,7 +85,7 @@ $(function() {
window.addEventListener('message', function(event) { window.addEventListener('message', function(event) {
const item = event.data; const item = event.data;
if (item.type === "ui") { if (item.type === "ui") {
if (item.status == true) { if (item.status) {
$('#serverName').text(item.serverName); $('#serverName').text(item.serverName);
$("body").css("background-image", "url(" + item.background + ")"); $("body").css("background-image", "url(" + item.background + ")");
display(true) display(true)
@@ -151,22 +151,6 @@ $(function() {
}) })
} }
/*
function tp(x, y, z, name) {
$.post("https://ND_Core/tpToLocation", JSON.stringify({
x: x,
y: y,
z: z,
name: name
}));
spawnMenu(false)
setTimeout(function(){
$("#spawnMenuContainer").empty();
}, 550);
return
}
*/
function createSpawnButtons(x, y, z, name) { function createSpawnButtons(x, y, z, name) {
$("#spawnMenuContainer").empty(); $("#spawnMenuContainer").empty();
setTimeout(function(){ setTimeout(function(){
@@ -198,8 +182,6 @@ $(function() {
gender: $("#newGender").val(), gender: $("#newGender").val(),
twtName: $("#newTwtName").val(), twtName: $("#newTwtName").val(),
department: $("#newDepartment").val(), department: $("#newDepartment").val(),
//startingCash: $("#newStartingCash").val(),
//startingBank: $("#newStartingBank").val(),
id: characterEdited id: characterEdited
})); }));
$("#characterButton" + characterEdited).text($("#newFirstName").val() + " " + $("#newLastName").val() + " (" + $("#newDepartment").val() + ")"); $("#characterButton" + characterEdited).text($("#newFirstName").val() + " " + $("#newLastName").val() + " (" + $("#newDepartment").val() + ")");
@@ -271,4 +253,4 @@ $(function() {
$.post("https://ND_Core/exitGame", JSON.stringify({})); $.post("https://ND_Core/exitGame", JSON.stringify({}));
return return
}) })
}); });