<commit_before>$(function () {
    $('#themes').change(function () {
        var item = $(':selected').val();
        changeTheme(item);

        $('.styleInfo').html("Currently viewing <a href='/css/" + item + ".css'>" + item + "</a>");
    });
});

function changeTheme(theme) {
    var stylshit = $('[title="hakyll_theme"]');
        stylshit.attr('href','/css/'+theme.toLowerCase()+'.css');
}
<commit_msg>fix dynamic theme selection<commit_after>$(function () {
  var query = location.search.substr(1);
  var s = "";
  var tValue = "default";
  query.split("&").forEach(function(part) {
        var item = part.split("=");
        s += " " + item;
        if (item[0] == "theme"){
          tValue = item[1];
        }
  });
  
  changeTheme(tValue);
  updateLinks(tValue);
  $('.styleInfo').html("Currently viewing <a href='/css/" + tValue + ".css'>" + tValue + "</a> ; " + s);
  

  $('#themes').change(function () {
      var item = $(':selected').val();
      window.location= location.search.split('?')[0] +'?theme=' + item;
  });
});

function changeTheme(theme) {
    var stylshit = $('[title="hakyll_theme"]');
        stylshit.attr('href','./css/'+theme.toLowerCase()+'.css');
}

function updateLinks(theme) {
  $.each(
    $('#navigation a'), function(index, value) {
      $(value).attr('href', $(value).attr('href') + '?theme=' + theme);
    }
  );
}
{'fraction_non_alphanumeric': 0.2452415812591508, 'fraction_numerical': 0.0029282576866764276, 'mean_word_length': 3.155015197568389, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7565397', 'n_tokens_mistral': 465, 'n_tokens_neox': 458, 'n_words': 79}