<commit_before>// Check for compatibility
if (window.localStorage){
  var switchTheme = function(){
    // Change the imported stylesheet from main.css to main_dark.css or vice versa
    // Change localstorage theme to 'dark'
    var theme = localStorage.getItem('theme');
    if (theme == 'dark')
    {
      localStorage.setItem('theme','');
      l = document.getElementById('style');
      l.setAttribute('href', '{% static "main.css" %}');
    }
    else{
      localStorage.setItem('theme','dark');
      l = document.getElementById('style');
      l.setAttribute('href', '{% static "main_dark.css" %}');
    }
    location.reload();
    // Call this function in the li to change the mode
  }

  // Do the same thing outside the function without changing localStorage to set correct theme
  var theme = localStorage.getItem('theme');
  if (theme == '')
  {
    l = document.getElementById('style');
    l.setAttribute('href', '{% static "main.css" %}');
  }
  else{
    l = document.getElementById('style');
    l.setAttribute('href', '{% static "main_dark.css" %}');
  }
}<commit_msg>Made l global<commit_after>// Check for compatibility
if (window.localStorage){
  var l = document.getElementById('style');
  var switchTheme = function(){
    // Change the imported stylesheet from main.css to main_dark.css or vice versa
    // Change localstorage theme to 'dark'
    var theme = localStorage.getItem('theme');
    if (theme == 'dark')
    {
      localStorage.setItem('theme','');
      l.setAttribute('href', '{% static "main.css" %}');
    }
    else{
      localStorage.setItem('theme','dark');
      l.setAttribute('href', '{% static "main_dark.css" %}');
    }
    location.reload();
    // Call this function in the li to change the mode
  }

  // Do the same thing outside the function without changing localStorage to set correct theme
  var theme = localStorage.getItem('theme');
  if (theme == '')
  {
    l.setAttribute('href', '{% static "main.css" %}');
  }
  else{
    l.setAttribute('href', '{% static "main_dark.css" %}');
  }
}
{'fraction_non_alphanumeric': 0.16017526777020447, 'fraction_numerical': 0.0, 'mean_word_length': 3.2458677685950414, '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': '1524226', 'n_tokens_mistral': 601, 'n_tokens_neox': 598, 'n_words': 167}