// ==UserScript==
// @name NTGVision Logged In
// @namespace https://ntgvision.com/ *
// @description Ensure Login
// @include https://ntgvision.com/ *
// ==/UserScript==

// login on the login page
if (window.location.pathname == "/Account/Login") {
  console.log("should login to login page")
  setTimeout(() => {
    var buttons = document.getElementsByTagName("button")
    for(var i=0; i < buttons.length; i++) {
      if (buttons[i].innerText.toLowerCase() == "login")
        buttons[i].click()
    }
  }, 10000)
}

// refresh every hour
setTimeout(() => {
  location.reload()
}, 1000 * 60 * 60)
