<commit_before>function scrollToHash(hash) {
  $(window).stop(true).scrollTo(hash, {
    axis: 'y',
    duration: 400,
    interrupt: false,
  }, );
}

function hashLinkHandler(e) {
  e.preventDefault();
  history.pushState(null, null, this.hash);
  scrollToHash(this.hash);

  if (Foundation.MediaQuery.is('small only')) {
    $('#main-menu').hide('fast');
  }
}

$(document).ready(() => {
  $(document).foundation();

  this.$('.faq-wrap').masonry({
    itemSelector: '.faq',
    columnWidth: '.faq-sizer',
    percentPosition: true,
  });

  // https://gist.github.com/flesler/3f3e1166690108abf747
  $('body').on('click', "a[href^='#'], a[href^='/#']", hashLinkHandler);

  this.$('.faq').on('on.zf.toggler off.zf.toggler', () => {
    this.$('.faq-wrap').masonry();
  });

  if (window.location.hash[0] === '#') {
    scrollToHash(window.location.hash);
  }

  // Read login status cookie, and show buttons if logged in
  var userId = Cookies.get('meteor_is_logged_in');
  if (userId === 'true') {
    $('.js-show-if-logged-out').addClass('hide');
    $('.js-show-if-logged-in').removeClass('hide');
  }
});<commit_msg>js compatibility for older android (M)<commit_after>function scrollToHash(hash) {
  $(window).stop(true).scrollTo(hash, {
    axis: 'y',
    duration: 400,
    interrupt: false,
  });
}

function hashLinkHandler(e) {
  e.preventDefault();
  history.pushState(null, null, this.hash);
  scrollToHash(this.hash);

  if (Foundation.MediaQuery.is('small only')) {
    $('#main-menu').hide('fast');
  }
}

$(document).ready(function() {
  $(document).foundation();

  $('.faq-wrap').masonry({
    itemSelector: '.faq',
    columnWidth: '.faq-sizer',
    percentPosition: true,
  });

  // https://gist.github.com/flesler/3f3e1166690108abf747
  $('body').on('click', "a[href^='#'], a[href^='/#']", hashLinkHandler);

  $('.faq').on('on.zf.toggler off.zf.toggler', function() {
    $('.faq-wrap').masonry();
  });

  if (window.location.hash[0] === '#') {
    scrollToHash(window.location.hash);
  }

  // Read login status cookie, and show buttons if logged in
  var userId = Cookies.get('meteor_is_logged_in');
  if (userId === 'true') {
    $('.js-show-if-logged-out').addClass('hide');
    $('.js-show-if-logged-in').removeClass('hide');
  }
});
{'fraction_non_alphanumeric': 0.23056537102473498, 'fraction_numerical': 0.01678445229681979, 'mean_word_length': 3.8191489361702127, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '7263325', 'n_tokens_mistral': 865, 'n_tokens_neox': 839, 'n_words': 122}