summaryrefslogtreecommitdiffstats
path: root/dist/js/logout.js
diff options
context:
space:
mode:
authorrstular <rok@stular.eu>2020-05-17 12:30:11 +0200
committerrstular <rok@stular.eu>2020-05-17 12:30:11 +0200
commitb9f1f71fb41fb422cf6dad624378252801f88949 (patch)
tree5c08686257702654f7e8bf549d722904e5c9fee4 /dist/js/logout.js
parentFix undefined variable in GSEC fetch timetable (diff)
parentdist should work, TODO: minify and bundle (diff)
downloadbeziapp-b9f1f71fb41fb422cf6dad624378252801f88949.tar
beziapp-b9f1f71fb41fb422cf6dad624378252801f88949.tar.gz
beziapp-b9f1f71fb41fb422cf6dad624378252801f88949.tar.bz2
beziapp-b9f1f71fb41fb422cf6dad624378252801f88949.tar.lz
beziapp-b9f1f71fb41fb422cf6dad624378252801f88949.tar.xz
beziapp-b9f1f71fb41fb422cf6dad624378252801f88949.tar.zst
beziapp-b9f1f71fb41fb422cf6dad624378252801f88949.zip
Diffstat (limited to 'dist/js/logout.js')
-rw-r--r--dist/js/logout.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/dist/js/logout.js b/dist/js/logout.js
new file mode 100644
index 0000000..f9c2543
--- /dev/null
+++ b/dist/js/logout.js
@@ -0,0 +1,5 @@
+// navigator.serviceWorker.controller.postMessage(JSON.stringify({action: "deletecaches"})); // cache only sets on initialization, so it should not be deleted.
+// since sw.js is not cached, updates work.
+localforage.clear().then(() => { // deletes localforage
+ window.location.replace("/index.html");
+});