function loginTimer(){
      var loginNum = 0;
      console.log("Login Timer Started");
      setInterval(function(){ //900 15 mins, 600 10 mins
        document.onmousemove = resetTimer;
        document.onkeypress = resetTimer;
        document.onload = resetTimer;
        document.onmousemove = resetTimer;
        document.onmousedown = resetTimer; // touchscreen presses
        document.ontouchstart = resetTimer;
        document.onclick = resetTimer;     // touchpad clicks
        document.onscroll = resetTimer;    // scrolling with arrow keys
        document.onkeypress = resetTimer;
        loginNum = loginNum + 1;
        if (loginNum >= logoutLimit){//default 900
          console.log("User Timed Out");
          signOut();
        } else if (loginNum > logoutReminder){//default 600
          //console.log("User Inactive");
          areYouStillThereNote(loginNum);
          areYouStillThereBool = true;
        }
        function resetTimer() {
          if (areYouStillThereBool) {
            ohThereYouAre();
          }
          loginNum = 0;
        }
      }, 1000);
    }
//after a certain amount of time. If the user is inactive for too long, they will be logged out
after a certain amount of time. If the user is inactive for too long, they will be logged out
after a certain amount of time . If the user is inactive for too long they will be logged out
function loginTimer(){
      var loginNum = 0;
      console.log("Login Timer Started");
      setInterval(function(){ 
        document.onmousemove = resetTimer;
        document.onkeypress = resetTimer;
        document.onload = resetTimer;
        document.onmousemove = resetTimer;
        document.onmousedown = resetTimer; 
        document.ontouchstart = resetTimer;
        document.onclick = resetTimer;     
        document.onscroll = resetTimer;    
        document.onkeypress = resetTimer;
        loginNum = loginNum + 1;
        if (loginNum >= logoutLimit){
          console.log("User Timed Out");
          signOut();
        } else if (loginNum > logoutReminder){
          areYouStillThereNote(loginNum);
          areYouStillThereBool = true;
        }
        function resetTimer() {
          if (areYouStillThereBool) {
            ohThereYouAre();
          }
          loginNum = 0;
        }
      }, 1000);
    }
function loginTimer ( ) { var loginNum = 0 ; console . log ( "Login Timer Started" ) ; setInterval ( function ( ) { document . onmousemove = resetTimer ; document . onkeypress = resetTimer ; document . onload = resetTimer ; document . onmousemove = resetTimer ; document . onmousedown = resetTimer ; document . ontouchstart = resetTimer ; document . onclick = resetTimer ; document . onscroll = resetTimer ; document . onkeypress = resetTimer ; loginNum = loginNum + 1 ; if ( loginNum >= logoutLimit ) { console . log ( "User Timed Out" ) ; signOut ( ) ; } else if ( loginNum > logoutReminder ) { areYouStillThereNote ( loginNum ) ; areYouStillThereBool = true ; } function resetTimer ( ) { if ( areYouStillThereBool ) { ohThereYouAre ( ) ; } loginNum = 0 ; } } , 1000 ) ; }
after a certain amount of time.
after a certain amount of time .
//900 15 mins, 600 10 mins // touchscreen presses // touchpad clicks // scrolling with arrow keys //default 900 //default 600 //console.log("User Inactive");