<commit_before>function saveTime() {
  localStorage.userTimeLeftClassic = globalTime;
  localStorage.userDateOfExitClassic = new Date();
}

function checkSavedTime(){
  if(localStorage.userTimeLeftClassic!=null) {
    var timeLeft = localStorage.userTimeLeftClassic;
    timeLeft = parseInt(timeLeft);

    var pauseState = localStorage.userPauseStateClassic;

    if(pauseState == "true")
      pauseState = true;
    else if(pauseState == "false")
      pauseState = false;

    if(pauseState) {
      document.getElementById("resume").disabled = false;
      document.getElementById("pause").disabled = true;

      shouldBePaused = true;
      timeLeft = timeLeft + 1000;
      startTimer("clock",timeLeft);
    }
    else {
      var dateOfExit = new Date(localStorage.userDateOfExitClassic);
      dateOfExit = dateOfExit.getTime();

      var dateOfReturn = new Date();
      dateOfReturn = dateOfReturn.getTime();

      var timeElapsed = dateOfReturn - dateOfExit;

      document.getElementById("resume").disabled = true;
      document.getElementById("pause").disabled = false;

      localStorage.userPauseStateClassic = false;

      var newTime = timeLeft - timeElapsed;

      startTimer("clock", newTime);
    }
  }
}

function checkIntervalSaves() {
  if(localStorage.userWorkValue != null) {
    workValue = localStorage.userWorkValue;
    workValue = parseInt(workValue);
    document.getElementById("test").value = workValue;
    document.getElementById("test2").innerHTML = workValue;
  }
  else {
    workValue = 25;
    startStop();
  }
}
<commit_msg>quick fix<commit_after>function saveTime() {
  localStorage.userTimeLeftClassic = globalTime;
  localStorage.userDateOfExitClassic = new Date();
}

function checkSavedTime(){
  if(localStorage.userTimeLeftClassic!=null) {
    var timeLeft = localStorage.userTimeLeftClassic;
    timeLeft = parseInt(timeLeft);

    var pauseState = localStorage.userPauseStateClassic;

    if(pauseState == "true")
      pauseState = true;
    else if(pauseState == "false")
      pauseState = false;

    if(pauseState) {
      document.getElementById("resume").disabled = false;
      document.getElementById("pause").disabled = true;

      shouldBePaused = true;
      timeLeft = timeLeft + 1000;
      startTimer("clock",timeLeft);
    }
    else {
      var dateOfExit = new Date(localStorage.userDateOfExitClassic);
      dateOfExit = dateOfExit.getTime();

      var dateOfReturn = new Date();
      dateOfReturn = dateOfReturn.getTime();

      var timeElapsed = dateOfReturn - dateOfExit;

      document.getElementById("resume").disabled = true;
      document.getElementById("pause").disabled = false;

      localStorage.userPauseStateClassic = false;

      var newTime = timeLeft - timeElapsed;

      startTimer("clock", newTime);
    }
  }
}

function checkIntervalSaves() {
  if(localStorage.userWorkValue != null) {
    workValue = localStorage.userWorkValue;
    workValue = parseInt(workValue);
    document.getElementById("test").value = workValue;
    document.getElementById("test2").innerHTML = workValue;
  }
  else {
    workValue = 25;
    workMode = false;
    breakMode = true;
    startStop();
  }
}

{'fraction_non_alphanumeric': 0.11166875784190715, 'fraction_numerical': 0.00439146800501882, 'mean_word_length': 3.5298295454545454, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2744766', 'n_tokens_mistral': 948, 'n_tokens_neox': 921, 'n_words': 171}