Created
January 9, 2018 02:45
-
-
Save brianonn/eb7741bcb0d0812930d435aa2943d49d to your computer and use it in GitHub Desktop.
play an alarm in 15 mins
This file contains 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
function myFunction () { | |
console.log('Executed!'); | |
var source = "https://firebasestorage.googleapis.com/v0/b/aminsbd-96be5.appspot.com/o/alarm.mp3?alt=media&token=c7597653-7d8b-44c6-9bb2-e8b9301dfe55" | |
var audio = document.createElement("audio"); | |
// | |
audio.autoplay = true; | |
// | |
audio.load() | |
audio.addEventListener("load", function() { | |
audio.play(); | |
}, true); | |
audio.src = source; | |
alert('Cek hasil Scrape ya :)'); | |
} | |
var interval = setInterval(function () { myFunction(); }, 900000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment