summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/index.php b/index.php
index 9276831..c42bbf1 100644
--- a/index.php
+++ b/index.php
@@ -5,6 +5,7 @@
<meta name="description" content="Berechnet die Preise für Pizza im Verhältnis zum Flächeninhalt. Lieber zwei kleine oder eine große Pizza kaufen?">
<link rel='stylesheet' type='text/css' href="/css/bootstrap.min.css">
<link rel='icon' href="/img/paw-144.png">
+ <link rel="manifest" href="/manifest.json">
<title>Beats per Minute</title>
<style>
html {
@@ -20,13 +21,13 @@
<div class="jumbotron">
<h1>Hier klicken um die BPMs zu zählen:</h1>
<h2><span id="showBpm">0</span> BPM</h2>
+ <button class="btn btn-primary">Click</button>
<div class="mt-5 mb-5 container" id="showDances">
<div class="row mb-2" id="showDances-standard">
</div>
<div class="row mb-2" id="showDances-latein"></div>
</div>
</div>
- <button class="btn btn-primary">Click</button>
</span>
<button id="reset" class="btn btn-secondary">Reset</button>
@@ -110,7 +111,7 @@
} else {
var _bpm = 60 / seconds
bpm.push( _bpm );
- if ( bpm.length > 15 ) {
+ if ( bpm.length > 25 ) {
// keep only last 10 clicks
bpm.shift();
}
@@ -151,5 +152,14 @@
reset();
});
});
+ if ('serviceWorker' in navigator){
+ navigator.serviceWorker.register('serviceworker.js').then(function(registration){
+ console.log('ServiceWorker registration successful with scope: ', registration.scope);
+ }).catch(function(err){
+ console.log('ServiceWorker registration failed: ', err);
+ });
+ } else {
+ console.log('no service worker found. offline access is not granted.');
+ }
</script>
</body>