<commit_before><script type="text/javascript">
  $(document).ready(function() {
    console.log("location")
    if (navigator.geolocation) {
      navigator.geolocation.getCurrentPosition(
        (pos) => {
          window.location.replace(
            '<%= city_by_location_path %>?' +
              'latitude=' + pos.coords.latitude + '&' +
              'longitude=' + pos.coords.longitude)
        },
        (err) => {
          console.log(err)
          window.location.replace('<%= cities_path %>')
        }
      )
    } else {
      console.log("no location")
      window.location.replace('<%= cities_path %>')
    }
  })
</script><commit_msg>Add a progress indicator to the root stub page.<commit_after><script type="text/javascript">
  $(document).ready(function() {

    $("#progress").hide()

    if (navigator.geolocation) {
      $("#progress").show()
      navigator.geolocation.getCurrentPosition(
        (pos) => {
          window.location.replace(
            '<%= city_by_location_path %>?' +
              'latitude=' + pos.coords.latitude + '&' +
              'longitude=' + pos.coords.longitude)
        },
        (err) => {
          console.log(err)
          window.location.replace('<%= cities_path %>')
        }
      )
    } else {
      window.location.replace('<%= cities_path %>')
    }
  })
</script>

<div id="progress" class="full-window centerable">
  <div class="centered">
    <h2>Detecting your location...</h2>
    <img src="https://s-media-cache-ak0.pinimg.com/originals/25/d7/83/25d78319891c914ec8e9aec6e04dc4a2.gif">
  </div>
</div>
{'fraction_non_alphanumeric': 0.1753943217665615, 'fraction_numerical': 0.017665615141955835, 'mean_word_length': 2.3110647181628394, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 24, 'https://': 1, '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': '1557388', 'n_tokens_mistral': 526, 'n_tokens_neox': 506, 'n_words': 67}