title: Auto-Login chrome Extension
body: <p>I've been trying to learn some javaScript and I'm trying to autoLogin to my student's website coding a simple chrome extension. It doesn't seem to be working, do you know what i'm getting wrong? 
  ty!!</p>
  
  <hr>
  
  <pre><code>&lt;script&gt;
              if (window.location.host =="MY_STUDENTS_HOST_SITE"){
                  var button = document.getElementsByClassName("loginurl")
                  button[0].click();
              }
              if (window.location.host == "MY_STUDENTS_LOGIN_HOST_SITE"){
                  var username = document.getElementById("username")
                  var password = document.getElementById("password")
                  username.write("MY_USERNAME")
                  password.write("MY_PASSWORD")
                  var button = document.getElementsById("loginbutton")
                  button.click();
              }
          &lt;/script&gt;
  </code></pre>