Ok so the page is a calendar of dates. All of the dates are not available, but every once in a while a date frees up and can be clicked on. My goal is to click on it as soon as it is available. There are a total of 30 dates on one page. This is the source of the button of a date once it is available.
<td class="FULL" valign="TOP" width="20" height="15" align="RIGHT">
<a href="" onclick="javascript:schedule(51629,'4/12/2018'); return false;"> 12</a>
<br>
AM
</td>
The same button looks like this the rest of the time:
<td class="NON" valign="TOP" width="20" height="15" align="RIGHT">
12
<br>
</td>
I have to say that i am pretty naive with scripts and know less than any of you who is reading this right now. I have installed an extension to refresh the page every 2 seconds, and I have tried writing this in greasemonkey:
document.querySelector('.onclick="javascript:schedule').click()
That doesnt seem to be working. Any help would be very much appreciated !