<commit_before>/* jshint browser: true, devel: true, indent: 2, curly: true, eqeqeq: true, futurehostile: true, latedef: true, undef: true, unused: true */
/* global $, jQuery, document */

function l(data) {
  'use strict';
  console.log(data);
}

var
  windowHeight = $(window).height(),
  animationSpeed = 300,
  slideMargin = parseInt( $('#header').css('padding-top'), 10 ),
  headerTop = $('#header').offset().top,
  headerHeight = $('#header').outerHeight(),
  sliderHeight = windowHeight - headerHeight - slideMargin;

var singleProject = {
  openSlideshow: function() {
    if ($('.slider-content').hasClass('slider-hidden')) {
        var slideIndex = $(this).attr('data-index');

        $('.cycle-slideshow').cycle('goto', slideIndex);

        $('.masonry-content').addClass('masonry-hidden');
        $('#single-vimeo-embed').addClass('vimeo-hidden');
        var delay = setTimeout(function() {
          $('.masonry-content').hide();
          $('.slider-content').removeClass('slider-hidden');
          $('#close-slider').removeClass('u-hidden');
          $('#close-single').addClass('u-hidden');
        }, animationSpeed);
      }
  },

  closeSlideshow: function() {

    $('.slider-content').addClass('slider-hidden');
    var delay = setTimeout(function() {
      $('.masonry-content').show();
      $('.js-masonry-container').masonry();
      $('#single-vimeo-embed').removeClass('vimeo-hidden');
      $('.masonry-content').removeClass('masonry-hidden');
      $('.slider-content').addClass('slider-hidden');
      $('#close-slider').addClass('u-hidden');
      $('#close-single').removeClass('u-hidden');
    }, animationSpeed);
  },
};

jQuery(document).ready(function () {
  'use strict';

  // SPLASH
  if ($('#splash').length) {

    $('#splash').height(windowHeight);

    $('#main-container').removeClass('u-hidden').css('min-height', windowHeight);
    $(window).on('scroll', function() {
      if ($(window).scrollTop() >= $('#main-container').offset().top && $('#splash').length) {
        $('#splash').remove();
        $('.splash-margin').css('margin-top', 0);
        $(window).scrollTop(0);
      }
    });

    $('#splash').on('click', function() {
      $('html, body').animate({scrollTop: $('#main-container').offset().top,}, ( animationSpeed * 2 ));
    });
  }

  // MENU FILTERS

  $('.js-menu-filter').on({
    click: function(e) {
      e.preventDefault();
      var target = $(this).data('target').toLowerCase();
      if (target === 'all') {
        $('.post').show();
        $('.js-masonry-container').masonry();
      } else {
        $('.post').hide();
        $('.category-' + target).show();
        $('.js-masonry-container').masonry();
      }

    }
  });

  // MASONRY
  if ( $('.js-masonry-container').length ) {
    $('.js-masonry-container').imagesLoaded( function() {
      $('.js-masonry-container').masonry({
        itemSelector: '.js-masonry-item',
        columnWidth: 1,
        gutter: 0,
        transitionDuration: '0s',
      }).css({
        'opacity': 1,
      });
      if ( $('.feed-item-title').length ) {
        $('.feed-item-title').css('visibility', 'visible');
      }
    });
  }
<commit_msg>tidy js<commit_after>/* jshint browser: true, devel: true, indent: 2, curly: true, eqeqeq: true, futurehostile: true, latedef: true, undef: true, unused: true */
/* global $, jQuery, document */

function l(data) {
  'use strict';
  console.log(data);
}

var
  windowHeight = $(window).height(),
  animationSpeed = 300,
  slideMargin = parseInt( $('#header').css('padding-top'), 10 ),
  headerTop = $('#header').offset().top,
  headerHeight = $('#header').outerHeight(),
  sliderHeight = windowHeight - headerHeight - slideMargin;

var singleProject = {
  openSlideshow: function() {
    if ($('.slider-content').hasClass('slider-hidden')) {
        var delay;
        var slideIndex = $(this).attr('data-index');

        $('.cycle-slideshow').cycle('goto', slideIndex);

        $('.masonry-content').addClass('masonry-hidden');
        $('#single-vimeo-embed').addClass('vimeo-hidden');

        delay = setTimeout(function() {
          $('.masonry-content').hide();
          $('.slider-content').removeClass('slider-hidden');
          $('#close-slider').removeClass('u-hidden');
          $('#close-single').addClass('u-hidden');
        }, animationSpeed);
      }
  },

  closeSlideshow: function() {
    var delay;

    $('.slider-content').addClass('slider-hidden');

    delay = setTimeout(function() {
      $('.masonry-content').show();
      $('.js-masonry-container').masonry();
      $('#single-vimeo-embed').removeClass('vimeo-hidden');
      $('.masonry-content').removeClass('masonry-hidden');
      $('.slider-content').addClass('slider-hidden');
      $('#close-slider').addClass('u-hidden');
      $('#close-single').removeClass('u-hidden');
    }, animationSpeed);
  },
};

jQuery(document).ready(function () {
  'use strict';

  // SPLASH
  if ($('#splash').length) {

    $('#splash').height(windowHeight);

    $('#main-container').removeClass('u-hidden').css('min-height', windowHeight);
    $(window).on('scroll', function() {
      if ($(window).scrollTop() >= $('#main-container').offset().top && $('#splash').length) {
        $('#splash').remove();
        $('.splash-margin').css('margin-top', 0);
        $(window).scrollTop(0);
      }
    });

    $('#splash').on('click', function() {
      $('html, body').animate({scrollTop: $('#main-container').offset().top,}, ( animationSpeed * 2 ));
    });
  }

  // MENU FILTERS

  $('.js-menu-filter').on({
    click: function(e) {
      e.preventDefault();
      var target = $(this).data('target').toLowerCase();

      if (target === 'all') {
        $('.post').show();
        $('.js-masonry-container').masonry();
      } else {
        $('.post').hide();
        $('.category-' + target).show();
        $('.js-masonry-container').masonry();
      }

    },
  });

  // MASONRY
  if ( $('.js-masonry-container').length ) {
    $('.js-masonry-container').imagesLoaded( function() {
      $('.js-masonry-container').masonry({
        itemSelector: '.js-masonry-item',
        columnWidth: 1,
        gutter: 0,
        transitionDuration: '0s',
      }).css({
        'opacity': 1,
      });
      if ( $('.feed-item-title').length ) {
        $('.feed-item-title').css('visibility', 'visible');
      }
    });
  }

{'fraction_non_alphanumeric': 0.2338456712672522, 'fraction_numerical': 0.0040777917189460475, 'mean_word_length': 2.9050826699326393, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4455271', 'n_tokens_mistral': 2016, 'n_tokens_neox': 1990, 'n_words': 295}