diff --git a/ND_ATMs/source/ui/js/listener.js b/ND_ATMs/source/ui/js/listener.js index 6a3240f..f957807 100644 --- a/ND_ATMs/source/ui/js/listener.js +++ b/ND_ATMs/source/ui/js/listener.js @@ -55,13 +55,16 @@ $(function() { confirmationScreen(false) successScreen(false) + const months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; + const d = new Date(); + window.addEventListener("message", function(event) { const item = event.data; if (item.status) { display(true) $("#playername").text(item.playerName) $("#balance").text(item.balance) - $("#date").text(item.date) + $("#date").text(item.date + ", " + months[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear()) $("#time").text(item.time) } else { display(false) @@ -142,4 +145,4 @@ $(function() { $.post("https://ND_ATMs/close", JSON.stringify({})); return }) -}); \ No newline at end of file +});