Added no-db warning

This commit is contained in:
ostertun
2020-10-05 23:52:09 +02:00
parent 7a3413b339
commit c211817f78
4 changed files with 38 additions and 5 deletions

View File

@@ -470,6 +470,20 @@ var onServiceWorkerLoaded = function() {
}
var onDatabaseLoaded = function() {
if (!canUseLocalDB) {
function NoDbWarningOk() {
createCookie('regatten_nodb_banner', true, 1);
$('#menu-nodb-warning').hideMenu();
}
function showNoDbWarning() {
if (!readCookie('regatten_nodb_banner')) {
$('#menu-nodb-warning').showMenu();
}
}
$('#menu-nodb-warning-okay').click(NoDbWarningOk);
showNoDbWarning();
}
onServiceWorkerLoaded();
initPushSettings();