]> git.mdlowis.com Git - projs/mdl.git/commitdiff
fixup
author80B <wtf@idk.lol>
Fri, 8 Jan 2021 01:39:10 +0000 (01:39 +0000)
committer80B <wtf@idk.lol>
Fri, 8 Jan 2021 01:39:10 +0000 (01:39 +0000)
index.html

index d2df1384041241662845f3122fd01b401cc96ee5..3111b1da8cc1f3a09889a3759428d65236f839eb 100644 (file)
 </aside>
 
 <script>
-const loadPage = file => {
-    const dir = { J: 'journals', N: 'notes', T: 'tasks' }[file[0]] + '/' + file
+const loadPage = (file, dir = { J: 'journals', N: 'notes', T: 'tasks' }[file[0]]) =>
     fetch(dir+"/"+file)
         .then(response => response.text())
         .then(data => {
             code.innerText = data;
             dialog.classList.add('hidden');
-        })
-};
+        });
 
 (() => {
     const L = (tag, props = {}, ...kids) => {