Intelligent Advisor – Extend Timeout Warning

// create interval to call the lookForTimeoutWarning every 5 minutes
var extendWorkCheck = setInterval(lookForTimeoutWarning, 300000);
// function to look for the button KEEP WORKING
function lookForTimeoutWarning() {
   let timeOutText = 'KEEP WORKING';
   // find all instances of KEEP WORKING and iterate through them
   $(':contains("'+timeOutText+'")').each(function() {
      if($( this ).text() == timeOutText){
         console.log('keep working extended');
         // simulate the button click to
         $( this ).trigger('click');
      }
   });
}

Leave a Reply

Your email address will not be published. Required fields are marked *