From: 80B Date: Thu, 7 Jan 2021 22:03:57 +0000 (+0000) Subject: thats just, like, my opinion, man X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=f4886d62c5f5c3a5cdc649edd304f483aec44d22;p=projs%2Fmdl.git thats just, like, my opinion, man --- 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)) )); })();