Skip to content

Commit a51032d

Browse files
committed
save time
1 parent c793717 commit a51032d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

js/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
popup.classList.remove('show');
7171
});
7272
saveBtn.addEventListener('click', async function () {
73+
let t = new Date();
74+
list.time = `${t.getFullYear()}/${t.getMonth()*1+1}/${t.getDate()} ${t.getHours()}:${t.getMinutes()}:${t.getSeconds()}`;
7375
let write = await database.ref('/').push(list);
7476
popup.classList.add('show');
7577
let url = `${urlOrigin}${urlPath}#${write.key}`;

0 commit comments

Comments
 (0)