<commit_before>export const mediaQueries = {
  palm: {
    size: window.matchMedia('(max-width: 600px)'),
    fontSize: '3.5vh'
  },
  lap: {
    size: window.matchMedia('(min-width: 601px) and (max-width: 959px)'),
    fontSize: '4.5vh'
  },
  desk: {
    size: window.matchMedia('(min-width: 960px)'),
    fontSize: '5.5vh'
  }
}

export function setupMqs(fn) {
  function mediaqueryresponse(key, action) {
    if (mediaQueries[key].size.matches) {
      action(key)
    }
  }

  Object.keys(mediaQueries).forEach(function(key) {
    mediaqueryresponse(key, fn)
      // need to debounce listener
    mediaQueries[key].size.addListener(mediaqueryresponse.bind(null, key, fn))
  })
}<commit_msg>fix(styles): display scrollbar when on mobile size<commit_after>export const mediaQueries = {
  palm: {
    size: window.matchMedia('(max-width: 600px)'),
    fontSize: '3.5vh'
  },
  lap: {
    size: window.matchMedia('(min-width: 601px) and (max-width: 959px)'),
    fontSize: '4.5vh'
  },
  desk: {
    size: window.matchMedia('(min-width: 960px) and (max-width: 1279px)'),
    fontSize: '5.5vh'
  },
  wall: {
    size: window.matchMedia('(min-width: 1280px)'),
    fontSize: '6.5vh'
  }
}

export function setupMqs(fn) {
  function mediaqueryresponse(key, action) {
    if (mediaQueries[key].size.matches) {
      action(key)
    }

    // display scrollbar if mobile size, otherwise hide it on larger screens
    if (mediaQueries.palm.size.matches) {
      document.querySelector('body').style.overflow = 'scroll'
    } else {
      document.querySelector('body').style.overflow = 'hidden'
    }
  }

  Object.keys(mediaQueries).forEach(function(key) {
    mediaqueryresponse(key, fn)
    // need to debounce listener
    mediaQueries[key].size.addListener(mediaqueryresponse.bind(null, key, fn))
  })
}
{'fraction_non_alphanumeric': 0.15512465373961218, 'fraction_numerical': 0.02548476454293629, 'mean_word_length': 3.4813895781637716, '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': '7617501', 'n_tokens_mistral': 673, 'n_tokens_neox': 641, 'n_words': 119}