add sound to notifications (implements #98)
This commit is contained in:
parent
ed0016e6d6
commit
2d2a95cc75
3 changed files with 23 additions and 2 deletions
19
www/js/notification.js
Normal file
19
www/js/notification.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* Notification functions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Play notification, if audio-element is present.
|
||||
*/
|
||||
function notify()
|
||||
{
|
||||
var notifySound = $("#notify-sound");
|
||||
if(notifySound) {
|
||||
notifySound.get(0).play();
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
// Play notification
|
||||
notify();
|
||||
});
|
||||
BIN
www/sounds/notification.mp3
Normal file
BIN
www/sounds/notification.mp3
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue