Created
September 20, 2018 04:53
-
-
Save schmich/4ca2698f76be8d1238e646efce16a1ae to your computer and use it in GitHub Desktop.
Cookie clicker audio notification
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(new MutationObserver(e => { | |
if (e && e[0] && e[0].addedNodes && e[0].addedNodes.length > 0) { | |
if (!window.cookieSound) { | |
window.cookieSound = new Audio(); | |
window.cookieSound.src = 'https://github.com/schmich/marinara/raw/master/src/audio/f62b45bc.mp3'; | |
} | |
window.cookieSound.play(); | |
} | |
})).observe(document.getElementById('shimmers'), { childList: true }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment