summaryrefslogtreecommitdiffstats
path: root/assets/js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/app.js.bvr4
-rw-r--r--assets/js/initialize.js6
2 files changed, 9 insertions, 1 deletions
diff --git a/assets/js/app.js.bvr b/assets/js/app.js.bvr
index c99124b..17d7555 100644
--- a/assets/js/app.js.bvr
+++ b/assets/js/app.js.bvr
@@ -4,6 +4,10 @@ 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(() => { })
diff --git a/assets/js/initialize.js b/assets/js/initialize.js
index cb5d210..219bc57 100644
--- a/assets/js/initialize.js
+++ b/assets/js/initialize.js
@@ -4,7 +4,11 @@ function getUrlParameter(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) {