forked from vikunja/frontend
b59b5def57
Co-authored-by: Dominik Pschenitschni <mail@celement.de> Reviewed-on: vikunja/frontend#818 Reviewed-by: konrad <k@knt.li> Co-authored-by: dpschen <dpschen@noreply.kolaente.de> Co-committed-by: dpschen <dpschen@noreply.kolaente.de>
11 lines
311 B
JavaScript
11 lines
311 B
JavaScript
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.mp3')
|
|
popSound.play()
|
|
} |