<commit_before>var themes = [ {
  file : 'clear.css',
  label : 'Clear',
  id : 'clear'
}, {
  file : 'jungle.css',
  label : 'Jungle',
  id : 'jungle'
} ];

var customCss;
var addedTheme;

function updateCss() {

  if (addedTheme) {
    addedTheme.parentNode.removeChild(addedTheme);
    addedTheme = null;
  }

  for (var i = 0; i < themes.length; i++) {
    var theme = themes[i];

    if (theme.id === localStorage.selectedTheme) {
      addedTheme = theme.element;
      document.head.insertBefore(theme.element, customCss);
    }
  }

}

if (!DISABLE_JS) {

  for (var i = 0; i < document.head.children.length; i++) {
    var element = document.head.children[i];

    if (element.rel === 'stylesheet'
        && element.href.indexOf('/custom.css') > -1) {

      customCss = element;
      break;
    }

  }
<commit_msg>Now selected themes are imposed over custom board css.<commit_after>var themes = [ {
  file : 'clear.css',
  label : 'Clear',
  id : 'clear'
}, {
  file : 'jungle.css',
  label : 'Jungle',
  id : 'jungle'
} ];

var addedTheme;

function updateCss() {

  if (addedTheme) {
    addedTheme.parentNode.removeChild(addedTheme);
    addedTheme = null;
  }

  for (var i = 0; i < themes.length; i++) {
    var theme = themes[i];

    if (theme.id === localStorage.selectedTheme) {
      addedTheme = theme.element;
      document.head.appendChild(theme.element);
    }
  }

}

if (!DISABLE_JS) {

{'fraction_non_alphanumeric': 0.15901060070671377, 'fraction_numerical': 0.0028268551236749115, 'mean_word_length': 2.816711590296496, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, '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': '5482097', 'n_tokens_mistral': 505, 'n_tokens_neox': 495, 'n_words': 111}