I have 5x countdown and i want to click the image below if the timer is "00:00". Now i have it like the code below but i must refresh the page everytime to click. Is there something like eventlistener for innerhtml. I solved it with timer which checks the innerhtml but i dont want to use a timer.
var ct1 = document.querySelector("#countdown1 > span").innerText
if (ct1 == "00:00") { document.querySelector("#farmimage_1").click(); }
var ct2 = document.querySelector("#countdown2 > span").innerText
if (ct2 == "00:00") { document.querySelector("#farmimage_2").click(); }
var ct3 = document.querySelector("#countdown3 > span").innerText
if (ct3 == "00:00") { document.querySelector("#farmimage_3").click(); }
var ct4 = document.querySelector("#countdown4 > span").innerText
if (ct4 == "00:00") { document.querySelector("#farmimage_4").click(); }
var ct5 = document.querySelector("#countdown5 > span").innerText
if (ct5 == "00:00") { document.querySelector("#farmimage_5").click(); }