Check for vibrate function

This commit is contained in:
Marcus Noble 2020-12-11 08:30:39 +00:00
parent 45ee87b6eb
commit 02b7708976
2 changed files with 3 additions and 3 deletions

View File

@ -65,7 +65,7 @@
}; };
function beep() { function beep() {
window.navigator.vibrate(500); if (window.navigator.vibrate) window.navigator.vibrate(500);
} }
function updateScore(participantId, points) { function updateScore(participantId, points) {

View File

@ -69,7 +69,7 @@
}); });
function showMessage(msg) { function showMessage(msg) {
window.navigator.vibrate(500); if (window.navigator.vibrate) window.navigator.vibrate(500);
document.getElementById('buzzer').disabled = true; document.getElementById('buzzer').disabled = true;
var mb = document.getElementById('messageBox'); var mb = document.getElementById('messageBox');
mb.innerHTML = msg; mb.innerHTML = msg;
@ -91,7 +91,7 @@
} }
function beep() { function beep() {
window.navigator.vibrate(500); if (window.navigator.vibrate) window.navigator.vibrate(500);
} }
</script> </script>
</body> </body>