<commit_before>(function(root) {

  var SessionTimeoutWarning = function () {}

  SessionTimeoutWarning.prototype.count = function () {
    root.setTimeout(this.show, 780000);  // count up to 13 minutes
  };

  SessionTimeoutWarning.prototype.show = function () {
    $('#renew-session').slideDown();
  };

  root.SessionTimeoutWarning = SessionTimeoutWarning;

})(window)

$(function() {

  if ($('body').hasClass('educator-signed-in')) {
    (new SessionTimeoutWarning).count();
  }

  $("#renew-sesion-link").click(function () {
    $.ajax({
      url: '/educators/reset',
      success: function () {
        $('#renew-session').slideUp();
      }
    });
  });
});<commit_msg>Reset timeout warning count each time user renews session<commit_after>(function(root) {

  var SessionTimeoutWarning = function () {}

  SessionTimeoutWarning.prototype.count = function () {
    root.setTimeout(this.show, 780000);  // count up to 13 minutes
  };

  SessionTimeoutWarning.prototype.show = function () {
    $('#renew-session').slideDown();
  };

  root.SessionTimeoutWarning = SessionTimeoutWarning;

})(window)

$(function() {

  if ($('body').hasClass('educator-signed-in')) {
    var warning = new SessionTimeoutWarning;
    warning.count();
  }

  $("#renew-sesion-link").click(function () {
    $.ajax({
      url: '/educators/reset',
      success: function () {
        $('#renew-session').slideUp();
        warning.count();   // Resent timeout count
      }
    });
  });
});
{'fraction_non_alphanumeric': 0.17813765182186234, 'fraction_numerical': 0.010796221322537112, 'mean_word_length': 3.3489736070381233, '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': '5005305', 'n_tokens_mistral': 458, 'n_tokens_neox': 429, 'n_words': 77}