]> git.mdlowis.com Git - projs/mdl.git/commitdiff
couple of stylistic preferences
author80B <wtf@idk.lol>
Thu, 7 Jan 2021 21:54:56 +0000 (21:54 +0000)
committer80B <wtf@idk.lol>
Thu, 7 Jan 2021 21:54:56 +0000 (21:54 +0000)
index.html

index 4dca5675e6ebb9134474b62ba85c570b34bcfcae..a712ed02c15c04834606e8681e99666b3880f1e6 100644 (file)
@@ -14,8 +14,8 @@
 </aside>
 
 <script>
-const loadPage = (file)=>{
-    const dir = (file[0] == 'J' ? 'journals' : (file[0] == 'N' ? 'notes' : 'tasks'));
+const loadPage = file => {
+    const dir = { J: 'journals', N: 'notes', T: 'tasks' }[file[0]] + '/' + file
     fetch(dir+"/"+file)
         .then(response => response.text())
         .then(data => {