Hello im working in javascript script with extension tampermonkey to refresh and check if there is available dates in appointement website if true then alert , my script work till click in input to show calendar and if i don't click the script doesn't work
this is my script
var gun=setInterval(function(){
if (document.getElementsByClassName('day activeClass').length !==0) {
new Audio('https://www.soundjay.com/mechanical/sounds/smoke-detector-1.mp3').play();
clearInterval(gun);
}
}, 1000)
i want to add a click in calendar input to detect changes or if there is alternative ways to check even hidden class or in source code of webpage
calendar html code
<input type="text" readonly="" class="form-control-input app_date validate" style="width: 260px;" id="app_date" name="app_date" placeholder="YYYY-MM-DD" onchange="this.form.submit();showLoader();" value="" autocomplete="off">