title: Click button when it changes to Active
body: <p>Im currently trying to find a solution for my problem, I have a website were orders come in and there is a button which turns blue and I need to click it to accept all orders.</p>
  
  <p>The logic behind it, it's a button which stays grey all the time, when a order enters it turns blue and active, and needs to be pressed. It's website in the browser.</p>
  
  <pre><code>window.onload=function() {
  
    setInterval(autoClick,100);
  }
  
  function autoClick() {
  
    if(document.getElementsByClassName("accept").length&gt;0) {
      document.getElementsByClassName("accept")[0].click();
    }
  }
  </code></pre>
  
  <p>I've started this but don't know how it shoud detect if the button turns blue.</p>