forked from vikunja/frontend
Play a sound when marking a task as done
parent
91a4a39527
commit
7f5140bbb4
Binary file not shown.
@ -0,0 +1,11 @@
|
||||
export const playSoundWhenDoneKey = 'playSoundWhenTaskDone'
|
||||
|
||||
export const playPop = () => {
|
||||
const enabled = localStorage.getItem(playSoundWhenDoneKey) === 'true' || localStorage.getItem(playSoundWhenDoneKey) === null
|
||||
if(!enabled) {
|
||||
return
|
||||
}
|
||||
|
||||
const popSound = new Audio('/audio/pop.wav')
|
||||
popSound.play()
|
||||
}
|
Loading…
Reference in New Issue