<commit_before>$(document).ready(function () {


    // Hopefully so that the code is easier to follow we define our selectors
    // now
    var stylesheet = "link#theme-def";
    var themenames = "div.themes";
    var themechooser = "select#theme-chooser";

    // This function handles everything to do with changing the theme
    // including:
    //             - Changing the stylesheet
    //             - Updating the footer text
    //             - Updating the dropdown selection
    //             - If the facility is available, saving the user preference
    var changeTheme = function(shortname) {

	// Change the stylesheet
	$(stylesheet).attr("href", "/css/" + shortname + ".css");

	// Hide all theme details
	$(themenames).hide();

	// Unhide the relevant theme
	$(themenames + "#" + shortname).show();

	// Update the dropdown
	$(themechooser).val(shortname);

	// If local storage is available, save the theme so the change
	// is persistent both accross page loads and entire sessions
	if (typeof(Storage) !== undefined) {
	    localStorage.setItem("theme", shortname);
	}
    };

    // In case there already is a saved preference, load that theme
    // otherwise load the default
    if (localStorage.theme) {
	changeTheme(localStorage.theme);
    } else {
	changeTheme("main");
    }

    // Finally this code is only run when the user makes a choice using the
    // dropdown in the footer
    $(themechooser).change(function() {

	var new_theme = $(themechooser).val();
	changeTheme(new_theme);

    });
});<commit_msg>quick fix (hopefully) :imp:<commit_after>$(document).ready(function () {


    // Hopefully so that the code is easier to follow we define our selectors
    // now
    var stylesheet = "link#theme-def";
    var themenames = "div.themes";
    var themechooser = "select#theme-chooser";

    // This function handles everything to do with changing the theme
    // including:
    //             - Changing the stylesheet
    //             - Updating the footer text
    //             - Updating the dropdown selection
    //             - If the facility is available, saving the user preference
    var changeTheme = function(shortname) {

	// Change the stylesheet
	$(stylesheet).attr("href", "/css/" + shortname + ".css");

	// Hide all theme details
	$(themenames).hide();

	// Unhide the relevant theme
	$(themenames + "#" + shortname).show();

	// Update the dropdown
	$(themechooser).val(shortname);

	// If local storage is available, save the theme so the change
	// is persistent both accross page loads and entire sessions
	if (typeof(Storage) !== undefined) {
	    localStorage.setItem("theme", shortname);
	}
    };

    // In case there already is a saved preference, load that theme
    // otherwise load the default
    if (localStorage.theme) {
	changeTheme(localStorage.theme);
    } else {
	changeTheme("dark");
    }

    // Finally this code is only run when the user makes a choice using the
    // dropdown in the footer
    $(themechooser).change(function() {

	var new_theme = $(themechooser).val();
	changeTheme(new_theme);

    });
});
{'fraction_non_alphanumeric': 0.11704180064308682, 'fraction_numerical': 0.0, 'mean_word_length': 2.7035714285714287, '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': '3699077', 'n_tokens_mistral': 882, 'n_tokens_neox': 836, 'n_words': 299}