From f4886d62c5f5c3a5cdc649edd304f483aec44d22 Mon Sep 17 00:00:00 2001 From: 80B Date: Thu, 7 Jan 2021 22:03:57 +0000 Subject: [PATCH] thats just, like, my opinion, man --- index.html | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index a712ed0..ae1724d 100644 --- a/index.html +++ b/index.html @@ -67,12 +67,8 @@ const loadPage = file => { fetch("index.json") .then(response => response.json()) - .then(data => { - for (const [key, value] of Object.entries(data)) { - pages.appendChild( - L('li', {}, L('a', {href: '#', onclick: ()=>loadPage(key)}, value))); - } - }) + .then(data => pages.append(...Object.entries(data).map( ([key, value]) => + L('li', {}, L('a', {href: '#', onclick: () => loadPage(key)}, value)) )); })(); -- 2.52.0