<commit_before>// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require jquery.spin
//= require jquery.waypoints
//= require jquery.waypoints.sticky
//= require bowser
//= require_tree .

$(function() {
  var $win = $(window)
  var $banner = $('.banner')
  var $header = $banner.find('header')
  var $nav = $('nav')

  function resizeBanner() {
    var minHeight = Math.max($win.height(), $header.height() * 1.8);
    $banner.css('min-height', minHeight + 'px');
  };

  var menuOffset = 150;

  $nav.find('a').each(function() {
    var $a = $(this);
    var $item = $a.parent();
    var selector = $a.attr('href');
    var $section = $(selector)

    $section.waypoint(function(dir) {
      if (dir == 'down') {
        $item.removeClass('active')
      } else {
        $item.addClass('active')
      }
    }, {
      offset: function() {
        return -$(this).height()+menuOffset;
      }
    })

    $section.waypoint(function(dir) {
      if (dir == 'down') {
        $item.addClass('active')
      } else {
        $item.removeClass('active')
      }
    }, {
      offset: menuOffset
    })
  })

  $win.resize(resizeBanner);
  resizeBanner();
  $nav.waypoint('sticky');

  var $openSourceBrowserAlert = $('.open-browser');
  var $browserName = $openSourceBrowserAlert.find('.browser')
  if (bowser.firefox || bowser.chrome) {
    $openSourceBrowserAlert.removeClass('hidden')
    $browserName.text($browserName.data('firefox'))
    if (bowser.firefox) {
      $openSourceBrowserAlert.find('.firefox').removeClass('hidden')
    }
    if (bowser.chrome) {
      $openSourceBrowserAlert.find('.chrome').removeClass('hidden')
    }
  }
});<commit_msg>Add semicolons in the JS files<commit_after>// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require jquery.spin
//= require jquery.waypoints
//= require jquery.waypoints.sticky
//= require bowser
//= require_tree .

$(function() {
  var $win    = $(window);
  var $banner = $('.banner');
  var $header = $banner.find('header');
  var $nav    = $('nav');

  function resizeBanner() {
    var minHeight = Math.max($win.height(), $header.height() * 1.8);
    $banner.css('min-height', minHeight + 'px');
  };

  var menuOffset = 150;

  $nav.find('a').each(function() {
    var $a       = $(this);
    var $item    = $a.parent();
    var selector = $a.attr('href');
    var $section = $(selector);

    $section.waypoint(function(dir) {
      if (dir == 'down') {
        $item.removeClass('active');
      } else {
        $item.addClass('active');
      }
    }, {
      offset: function() {
        return -$(this).height() + menuOffset;
      }
    })

    $section.waypoint(function(dir) {
      if (dir == 'down') {
        $item.addClass('active');
      } else {
        $item.removeClass('active');
      }
    }, {
      offset: menuOffset
    })
  })

  $win.resize(resizeBanner);
  resizeBanner();
  $nav.waypoint('sticky');

  var $openSourceBrowserAlert = $('.open-browser');
  var $browserName = $openSourceBrowserAlert.find('.browser');
  if (bowser.firefox || bowser.chrome) {
    $openSourceBrowserAlert.removeClass('hidden');
    $browserName.text($browserName.data('firefox'));
    if (bowser.firefox) {
      $openSourceBrowserAlert.find('.firefox').removeClass('hidden');
    }
    if (bowser.chrome) {
      $openSourceBrowserAlert.find('.chrome').removeClass('hidden');
    }
  }
});
{'fraction_non_alphanumeric': 0.16651904340124005, 'fraction_numerical': 0.0022143489813994687, 'mean_word_length': 3.051121076233184, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4652963', 'n_tokens_mistral': 1454, 'n_tokens_neox': 1409, 'n_words': 332}