|
@@ -1,15 +1,21 @@
|
|
|
-window.addEventListener("load", () => {
|
|
|
+function init() {
|
|
|
+ let dates = document.querySelectorAll("span.build-date");
|
|
|
+
|
|
|
+ for (let date of dates) {
|
|
|
+ date.textContent = new Date(date.textContent).toLocaleString();
|
|
|
+ }
|
|
|
+
|
|
|
let artifacts = document.querySelectorAll("div.artifact-item");
|
|
|
- for(let artifact of artifacts) {
|
|
|
+ for (let artifact of artifacts) {
|
|
|
let contents = artifact.querySelector(".artifact-contents");
|
|
|
- if(!contents || !(contents instanceof HTMLElement))
|
|
|
+ if (!contents || !(contents instanceof HTMLElement))
|
|
|
continue;
|
|
|
artifact.addEventListener("click", e => {
|
|
|
e.preventDefault();
|
|
|
- if(contents.classList.contains("contents-visible"))
|
|
|
+ if (contents.classList.contains("contents-visible"))
|
|
|
contents.classList.remove("contents-visible");
|
|
|
else
|
|
|
contents.classList.add("contents-visible");
|
|
|
});
|
|
|
}
|
|
|
-});
|
|
|
+}
|