I need to monitor a webpage for new events. The page shows a string ("No events") if no events are available. This page reloads automatically every minute. This page will often be in the background, but I wan't to be notified events are available, because I need to respond to them.
This is what I've come up with so far, and this works. I use the Chrome "Custom JavaScript for websites" to run the below code.
var element = document.getElementById('queue').innerText;
if (element !== "No events") {
window.alert("ALARM!ALARM!");
}
However, instead of a alert popup, I would like a local audio file to play.
Use This.
Note:
The extension of your audio(.mp3) and the associated content types must be added in MIME types in IIS