This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
2021-01-30 20:45:54 +00:00
|
|
|
export const playSoundWhenDoneKey = 'playSoundWhenTaskDone'
|
|
|
|
|
|
|
|
export const playPop = () => {
|
|
|
|
const enabled = localStorage.getItem(playSoundWhenDoneKey) === 'true' || localStorage.getItem(playSoundWhenDoneKey) === null
|
|
|
|
if(!enabled) {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2021-10-03 18:48:02 +00:00
|
|
|
const popSound = new Audio('/audio/pop.mp3')
|
2021-01-30 20:45:54 +00:00
|
|
|
popSound.play()
|
|
|
|
}
|