diff options
author | beziapp <60441126+beziapp@users.noreply.github.com> | 2020-01-30 00:32:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-30 00:32:00 +0100 |
commit | 32a43c2ce04fd9b594cea615552d5181c9a72e44 (patch) | |
tree | 2dfd68b1701c8abbbcf1510a118389f84538ef97 /js/changelog.js | |
parent | Merge pull request #3 from beziapp/dev (diff) | |
parent | Weekly calendar accent color (diff) | |
download | beziapp-32a43c2ce04fd9b594cea615552d5181c9a72e44.tar beziapp-32a43c2ce04fd9b594cea615552d5181c9a72e44.tar.gz beziapp-32a43c2ce04fd9b594cea615552d5181c9a72e44.tar.bz2 beziapp-32a43c2ce04fd9b594cea615552d5181c9a72e44.tar.lz beziapp-32a43c2ce04fd9b594cea615552d5181c9a72e44.tar.xz beziapp-32a43c2ce04fd9b594cea615552d5181c9a72e44.tar.zst beziapp-32a43c2ce04fd9b594cea615552d5181c9a72e44.zip |
Diffstat (limited to 'js/changelog.js')
-rw-r--r-- | js/changelog.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/js/changelog.js b/js/changelog.js new file mode 100644 index 0000000..9fb9a84 --- /dev/null +++ b/js/changelog.js @@ -0,0 +1,24 @@ +async function checkLogin() { + localforage.getItem("logged_in").then(function (value) { + // This code runs once the value has been loaded + // from the offline store. + if (value !== true) { + window.location.replace("/index.html"); + } + }).catch(function (err) { + // This code runs if there were any errors + console.log(err); + }); +} + +document.addEventListener("DOMContentLoaded", () => { + checkLogin(); + + // Setup back button + $("#nav-back-button").click(function () { + window.location.replace("/pages/about.html"); + }); + + var elems = document.querySelectorAll(".collapsible"); + var instances = M.Collapsible.init(elems, {}); +});
\ No newline at end of file |