Basic polls display + UI work

This commit is contained in:
2021-03-27 20:37:17 +01:00
parent 64b2e9e685
commit ac27c87c59
9 changed files with 199 additions and 32 deletions

10
scripts/poll.js Normal file
View File

@ -0,0 +1,10 @@
window.addEventListener('DOMContentLoaded', (event) => {
displayLocalTimestamps();
});
function displayLocalTimestamps() {
for (const el of document.getElementsByTagName('time')) {
let dateObj = new Date(el.getAttribute('datetime'));
el.innerText = dateObj.toLocaleString();
}
}