<commit_before>/* global chrome */

const $ = window.jQuery

function main () {
  // this global check will prevent us from running process() multiple times.
  if ($('#module-linker-done').length) return
  $('#js-repo-pjax-container').append($('<span id="module-linker-done">'))

  let path = location.pathname.split('/')
  window.pathdata = {
    user: path[1],
    repo: path[2],
    ref: path[4] || $('.branch-select-menu .js-select-button').text().trim() || 'master',
    current: path[4] ? path.slice(5) : '',
    last: path.slice(-1)[0]
  }

  let blobWrapper = document.querySelector('.data.blob-wrapper')
  if (blobWrapper) {
    window.filetype = blobWrapper.className.match(/type-(\w+)/)[1]

    switch (window.filetype) {
      case 'javascript':
      case 'coffeescript':
      case 'typescript':
      case 'jsx':
        require('./languages/javascript').process()
        break
      case 'go':
        require('./languages/go').process()
        break
      case 'c':
        require('./languages/c').process()
        break
      case 'haskell':
        require('./languages/haskell').process()
        break
      case 'python':
        require('./languages/python').process()
        break
      case 'ruby':
        require('./languages/ruby').process()
        break
      case 'crystal':
        require('./languages/crystal').process()
        break
      case 'dart':
        require('./languages/dart').process()
        break
      case 'elm':
      case 'json':
      case 'json5':
      case 'jsonld':
        require('./languages/json').process()
        break
      case 'julia':
        require('./languages/julia').process()
        break
      case 'markdown':
        require('./languages/markdown').process()
        break
      case 'nim':
        require('./languages/nim').process()
        break
      case 'purescript':
        require('./languages/purescript').process()
        break
      case 'rust':
        require('./languages/rust').process()
        break
      case 'toml':
        require('./languages/toml').process()
        break
      case 'yaml':
        require('./languages/yaml').process()
        break
      // css
      // scss
      // sass
      // less
      // stylus
      // lua
      // php
      // ocaml'
      // restructuredtext'
      case 'text':
        require('./languages/text').process()
        break
    }
  }
<commit_msg>default filetype to markdown.<commit_after>/* global chrome */

const $ = window.jQuery

function main () {
  // this global check will prevent us from running process() multiple times.
  if ($('#module-linker-done').length) return
  $('#js-repo-pjax-container').append($('<span id="module-linker-done">'))

  let path = location.pathname.split('/')
  window.pathdata = {
    user: path[1],
    repo: path[2],
    ref: path[4] || $('.branch-select-menu .js-select-button').text().trim() || 'master',
    current: path[4] ? path.slice(5) : '',
    last: path.slice(-1)[0]
  }

  let blobWrapper = document.querySelector('.data.blob-wrapper')
  if (blobWrapper) {
    window.filetype = blobWrapper.className.match(/type-(\w+)/)[1]
  } else {
    window.filetype = 'markdown'
  }

  switch (window.filetype) {
    case 'javascript':
    case 'coffeescript':
    case 'typescript':
    case 'jsx':
      require('./languages/javascript').process()
      break
    case 'go':
      require('./languages/go').process()
      break
    case 'c':
      require('./languages/c').process()
      break
    case 'haskell':
      require('./languages/haskell').process()
      break
    case 'python':
      require('./languages/python').process()
      break
    case 'ruby':
      require('./languages/ruby').process()
      break
    case 'crystal':
      require('./languages/crystal').process()
      break
    case 'dart':
      require('./languages/dart').process()
      break
    case 'elm':
    case 'json':
    case 'json5':
    case 'jsonld':
      require('./languages/json').process()
      break
    case 'julia':
      require('./languages/julia').process()
      break
    case 'markdown':
      require('./languages/markdown').process()
      break
    case 'nim':
      require('./languages/nim').process()
      break
    case 'purescript':
      require('./languages/purescript').process()
      break
    case 'rust':
      require('./languages/rust').process()
      break
    case 'toml':
      require('./languages/toml').process()
      break
    case 'yaml':
      require('./languages/yaml').process()
      break
    // css
    // scss
    // sass
    // less
    // stylus
    // ocaml'
    // lua
    // php
    case 'text':
      require('./languages/text').process()
      break
  }

{'fraction_non_alphanumeric': 0.17498407305160332, 'fraction_numerical': 0.003822467615204927, 'mean_word_length': 2.1274900398406373, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3764910', 'n_tokens_mistral': 1428, 'n_tokens_neox': 1401, 'n_words': 283}