summaryrefslogtreecommitdiffstats
path: root/dist/js
diff options
context:
space:
mode:
authorsijanec <anton@sijanec.eu>2021-03-25 18:09:50 +0100
committersijanec <anton@sijanec.eu>2021-03-25 18:09:50 +0100
commit1f9f384933ac7afa5bca8a2a465f6f1ae6f02edd (patch)
tree65a06f833dc64878cbca0188b28e88d1d5cb243b /dist/js
parentMerge branch 'master' into dev (diff)
downloadbeziapp-1f9f384933ac7afa5bca8a2a465f6f1ae6f02edd.tar
beziapp-1f9f384933ac7afa5bca8a2a465f6f1ae6f02edd.tar.gz
beziapp-1f9f384933ac7afa5bca8a2a465f6f1ae6f02edd.tar.bz2
beziapp-1f9f384933ac7afa5bca8a2a465f6f1ae6f02edd.tar.lz
beziapp-1f9f384933ac7afa5bca8a2a465f6f1ae6f02edd.tar.xz
beziapp-1f9f384933ac7afa5bca8a2a465f6f1ae6f02edd.tar.zst
beziapp-1f9f384933ac7afa5bca8a2a465f6f1ae6f02edd.zip
Diffstat (limited to 'dist/js')
-rwxr-xr-xdist/js/app.js8
-rwxr-xr-xdist/js/initialize.js1
2 files changed, 8 insertions, 1 deletions
diff --git a/dist/js/app.js b/dist/js/app.js
index 816250f..c0d2c6f 100755
--- a/dist/js/app.js
+++ b/dist/js/app.js
@@ -5,13 +5,19 @@
// @begin=js@
const app_version = "1.0.16.3-beta";
-const previous_commit = "5376b618e88d85b3fc16561176478c104af1a01b";
+const previous_commit = "ec8292f44fd0040145c1643ff871a98e3a41fcd0";
const BEZIAPP_UPDATE_INTERVAL = 300; // update vsakih 300 sekund
+if (location.protocol !== 'https:') {
+ location.replace(`https:${location.href.substring(location.protocol.length)}`);
+}
+
if ("serviceWorker" in navigator) {
navigator.serviceWorker.register("/sw.js")
.then(() => { })
.catch((err) => console.log("Service worker registration failed", err));
+} else {
+ alert("Vaša naprava ne podpira BežiAppa. Your device does not support BežiApp.");
}
// Listen to messages from service workers.
diff --git a/dist/js/initialize.js b/dist/js/initialize.js
index 1d9a5f6..7330461 100755
--- a/dist/js/initialize.js
+++ b/dist/js/initialize.js
@@ -1,3 +1,4 @@
function getUrlParameter(sParam){const url_params=new URLSearchParams(window.location.search);const found_param=url_params.get(sParam);return found_param===null?"":found_param;}
+try{localforage.getItem("logged_in").then(console.log);}catch{alert("Vaša naprava ne podpira BežiAppa. Your device does not support BežiApp.");}
localforage.getItem("logged_in").then(function(value){if(value==null){setupStorage(true);window.location.replace("/login.html");}else if(value===false){window.location.replace("/login.html");}else{if(getUrlParameter("m")!==""){window.location.replace("/pages/messaging.html#"+getUrlParameter("m"));}else{window.location.replace("/pages/timetable.html");}}}).catch(function(err){console.log(err);}); \ No newline at end of file