summaryrefslogtreecommitdiffstats
path: root/assets/js/app.js.bvr
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/app.js.bvr')
-rw-r--r--assets/js/app.js.bvr6
1 files changed, 6 insertions, 0 deletions
diff --git a/assets/js/app.js.bvr b/assets/js/app.js.bvr
index c99124b..7375b61 100644
--- a/assets/js/app.js.bvr
+++ b/assets/js/app.js.bvr
@@ -4,10 +4,16 @@ const app_version = "<@?g app_version@>";
const previous_commit = "<@?g latest_commit@>";
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.