summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-11-21 15:31:58 +0300
committerAndrew Dolgov <[email protected]>2018-11-21 15:31:58 +0300
commit42bb935ae79b7d6ef614181cb00304539894ebfb (patch)
treed7668810ec15c7bb5a837a4eb43fbdedaebb95c6
parent1ea4a3f80a503d43df4a835ed5647c4a93ca80bd (diff)
notify user if serviceWorker support is missing
-rw-r--r--index.php6
-rw-r--r--read.html2
2 files changed, 7 insertions, 1 deletions
diff --git a/index.php b/index.php
index c904d96..782bf0f 100644
--- a/index.php
+++ b/index.php
@@ -144,6 +144,10 @@
window.location.reload();
}
});
+ } else {
+ $(".container-main")
+ .addClass("alert alert-danger")
+ .html("Service worker support missing in browser (are you using plain HTTP?).");
}
mark_offline_books();
@@ -152,7 +156,7 @@
});
</script>
-<div class="container">
+<div class="container container-main">
<div class="modal fade" id="summary-modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
diff --git a/read.html b/read.html
index f035422..5d9b4ee 100644
--- a/read.html
+++ b/read.html
@@ -259,6 +259,8 @@
init_loader();
});
+ } else {
+ alert("Service worker support missing in browser (are you using plain HTTP?).");
}
});