summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorrstular <rok@stular.eu>2020-01-30 00:14:29 +0100
committerrstular <rok@stular.eu>2020-01-30 00:14:29 +0100
commite32fb47304ab8b4aa21f11ec42f454077276dfcc (patch)
treefcea563568b2f654c629580b7e8f879465109df1 /js
parentTemporary inclusion/exclusion option, fixed zoom (diff)
downloadbeziapp-e32fb47304ab8b4aa21f11ec42f454077276dfcc.tar
beziapp-e32fb47304ab8b4aa21f11ec42f454077276dfcc.tar.gz
beziapp-e32fb47304ab8b4aa21f11ec42f454077276dfcc.tar.bz2
beziapp-e32fb47304ab8b4aa21f11ec42f454077276dfcc.tar.lz
beziapp-e32fb47304ab8b4aa21f11ec42f454077276dfcc.tar.xz
beziapp-e32fb47304ab8b4aa21f11ec42f454077276dfcc.tar.zst
beziapp-e32fb47304ab8b4aa21f11ec42f454077276dfcc.zip
Diffstat (limited to 'js')
-rw-r--r--js/changelog.js24
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