mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-18 14:26:03 +01:00
Update listener.js
This commit is contained in:
@@ -55,8 +55,8 @@ $(function() {
|
|||||||
confirmationScreen(false)
|
confirmationScreen(false)
|
||||||
successScreen(false)
|
successScreen(false)
|
||||||
|
|
||||||
const months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
const options = {year: 'numeric', month: 'long', day: 'numeric'};
|
||||||
const d = new Date();
|
const today = new Date();
|
||||||
|
|
||||||
window.addEventListener("message", function(event) {
|
window.addEventListener("message", function(event) {
|
||||||
const item = event.data;
|
const item = event.data;
|
||||||
@@ -64,7 +64,7 @@ $(function() {
|
|||||||
display(true)
|
display(true)
|
||||||
$("#playername").text(item.playerName)
|
$("#playername").text(item.playerName)
|
||||||
$("#balance").text(item.balance)
|
$("#balance").text(item.balance)
|
||||||
$("#date").text(item.date + ", " + months[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear())
|
$("#date").text(`${item.date}, ${today.toLocaleDateString("en-US", options)}`)
|
||||||
$("#time").text(item.time)
|
$("#time").text(item.time)
|
||||||
} else {
|
} else {
|
||||||
display(false)
|
display(false)
|
||||||
|
|||||||
Reference in New Issue
Block a user