<commit_before>// Agency Theme JavaScript

(function ($) {
  "use strict"; // Start of use strict

  // random header image generator
  var size = 10;
  var random = Math.floor(size * Math.random());
  var imgUrl = '../img/header/masthead-' + random + '.jpg';
  $('header').css('background-image', 'url(' + imgUrl + ')');

  // login form submission
  $('#login-form').on('submit', function (event) {
    event.preventDefault();
    $.post('/user/login/', $(this).serialize());
  });

  // jQuery for page scrolling feature - requires jQuery Easing plugin
  $('a.page-scroll').bind('click', function (event) {
    var $anchor = $(this);
    $('html, body').stop().animate({
      scrollTop: ($($anchor.attr('href')).offset().top - 50)
    }, 500, 'easeInOutExpo');
    event.preventDefault();
  });

  // Highlight the top nav as scrolling occurs
  $('body').scrollspy({
    target: '.navbar-fixed-top',
    offset: 51
  });

  // Closes the Responsive Menu on Menu Item Click
  $('.navbar-collapse ul li a').click(function () {
    $('.navbar-toggle:visible').click();<commit_msg>added client-side redirect upon successful auth response<commit_after>(function ($) {
  "use strict"; // Start of use strict

  // random header image generator
  var size = 10;
  var random = Math.floor(size * Math.random());
  var imgUrl = '../img/header/masthead-' + random + '.jpg';
  $('header').css('background-image', 'url(' + imgUrl + ')');

  // login form submission
  $('#login-form').on('submit', function (event) {
    event.preventDefault();
    $.post('/user/login/', $(this).serialize())
      .done(function (res) {
        window.location.href = res.redirect;
      })
      .fail(function () {
        alert('incorrect login or password');
      });
  });

  // jQuery for page scrolling feature - requires jQuery Easing plugin
  $('a.page-scroll').bind('click', function (event) {
    var $anchor = $(this);
    $('html, body').stop().animate({
      scrollTop: ($($anchor.attr('href')).offset().top - 50)
    }, 500, 'easeInOutExpo');
    event.preventDefault();
  });

  // Highlight the top nav as scrolling occurs
  $('body').scrollspy({
    target: '.navbar-fixed-top',
    offset: 51
  });

  // Closes the Responsive Menu on Menu Item Click
  $('.navbar-collapse ul li a').click(function () {
    $('.navbar-toggle:visible').click();
{'fraction_non_alphanumeric': 0.1969243912857753, 'fraction_numerical': 0.007689021785561726, 'mean_word_length': 3.1746880570409983, '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': '6109228', 'n_tokens_mistral': 739, 'n_tokens_neox': 702, 'n_words': 184}