mirror of
https://github.com/ssyyhhrr/stewardle.git
synced 2025-11-10 19:33:45 -05:00
DayJS Fix
This commit is contained in:
2
app.js
2
app.js
@@ -88,7 +88,7 @@ schedule.scheduleJob("0 0 * * *", async () => {
|
|||||||
})
|
})
|
||||||
let rawStatsFile = fs.readFileSync(statsPath)
|
let rawStatsFile = fs.readFileSync(statsPath)
|
||||||
let statsFile = JSON.parse(rawStatsFile)
|
let statsFile = JSON.parse(rawStatsFile)
|
||||||
let date = dayjs.format("YYYY-MM-DD")
|
let date = dayjs().format("YYYY-MM-DD")
|
||||||
statsFile[date] = stats
|
statsFile[date] = stats
|
||||||
let newStatsFile = JSON.stringify(statsFile)
|
let newStatsFile = JSON.stringify(statsFile)
|
||||||
fs.writeFileSync(statsPath, newStatsFile)
|
fs.writeFileSync(statsPath, newStatsFile)
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ async function submit(guess, real) {
|
|||||||
if (gg != null) {
|
if (gg != null) {
|
||||||
gg.classList.remove("input")
|
gg.classList.remove("input")
|
||||||
gg.classList.add("gg")
|
gg.classList.add("gg")
|
||||||
let greeting = won ? "Congratulations!" : "Bwoah."
|
let greeting = won ? "Well Done!" : "Bwoah."
|
||||||
gg.innerHTML = `<h2>${greeting}</h2><div class="p"><h5>The driver was</h5><h4> ${winner.winner}!</h4></div><div class="share"><div class="btn"><i class="fa-solid fa-share"></i> Share</div></div><div class="p timer"><h3>Next Stewardle</h3></div><div class="p"><h4 id="time">00:00:00:000</h4></div>`
|
gg.innerHTML = `<h2>${greeting}</h2><div class="p"><h5>The driver was</h5><h4> ${winner.winner}!</h4></div><div class="share"><div class="btn"><i class="fa-solid fa-share"></i> Share</div></div><div class="p timer"><h3>Next Stewardle</h3></div><div class="p"><h4 id="time">00:00:00:000</h4></div>`
|
||||||
document.getElementsByClassName("btn")[1].onmousedown = () => {
|
document.getElementsByClassName("btn")[1].onmousedown = () => {
|
||||||
open(document.getElementsByClassName("shareScreen")[0])
|
open(document.getElementsByClassName("shareScreen")[0])
|
||||||
|
|||||||
Reference in New Issue
Block a user