<commit_before><script>
$(document).ready(function() {
    $('#versionselector').change(function(){
        alert("changed");
    });
});
</script>


<div class="rst-versions" data-toggle="rst-versions">
<span class="rst-current-version" data-toggle="rst-current-version">
  <span class="icon icon-book"> Versions</span>
  <form id="versionselector"><select>
      {% for version in versions %}
          <option value="{{version}}">{{version}}</option>
      {% endfor %}
  </select></form>
</span>
</div>

<commit_msg>get the version thing working<commit_after><script>
// when the user changes their selection in the dropdown menu, navigate
// to a new set of root documentation
$(document).ready(function() {
    $('#versionselector').change(function(){
        window.location.href = "/" + $('#versionselector').val();
    });
});


// get all of the releases from github, and use these to populate the
// dropdown menu of different releases
$(document).ready(function() {
    $.get("https://api.github.com/repos/rmcgibbo/mdtraj/releases")
      .done(function(data) {
          numItems = data.length;
          for (var i = 0; i < numItems; i++) {
              var key = data[i].tag_name;
              $('#versionselector')
                .append($('<option></option>', { value : key})
                .text(key)); 
           }
      });
});
</script>


<!-- This is the actual HTML bar at the bottom of the side bar -->
<!-- It gives a little select menu with all of the versions of the -->
<!-- documentation that you can switch between -->
<div class="rst-versions" data-toggle="rst-versions">
<span class="rst-current-version" data-toggle="rst-current-version">
  <span class="icon icon-book"> Versions</span>
  <form><select id="versionselector">
      <option value="latest">latest</option>
  </select></form>
</span>
</div>


{'fraction_non_alphanumeric': 0.18122626153011395, 'fraction_numerical': 0.0005425935973955507, 'mean_word_length': 3.171945701357466, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 36, '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': '3956016', 'n_tokens_mistral': 545, 'n_tokens_neox': 520, 'n_words': 142}