<commit_before>docLayer.modules.define("theme", {
	css: false,
	checktheme: function () {
		var _ = this;
		var d = new Date();

		var curr_hour = d.getHours();

		if (curr_hour < 6 || curr_hour > 20) {
			this.switchToTheme("dark");
		} else {
			getPref("theme", function (theme) {
				_.switchToTheme(theme);
			});
		}

	},
	switchToTheme: function (themeName) {
		this.selectedTheme = themeName;
		if (themeName == "default") {
			$(document.body).removeClass("dark-theme");
			$("#themestyle").remove();
		} else if (themeName == "dark") {
			$(document.body).addClass("dark-theme");
			$("#themestyle").remove();<commit_msg>bug fix when pref is default<commit_after>docLayer.modules.define("theme", {
	css: false,
	checktheme: function () {
		var _ = this;
		var d = new Date();

		var curr_hour = d.getHours();

		if (curr_hour < 6 || curr_hour > 20) {
			this.switchToTheme("dark");
		} else {
			getPref("theme", function (theme) {
				_.switchToTheme(theme);
			});
		}

	},
	switchToTheme: function (themeName) {
		themeName = themeName || "default";
		this.selectedTheme = themeName;
		if (themeName == "default") {
			$(document.body).removeClass("dark-theme");
			$("#themestyle").remove();
		} else if (themeName == "dark") {
			$(document.body).addClass("dark-theme");
			$("#themestyle").remove();
{'fraction_non_alphanumeric': 0.19163498098859316, 'fraction_numerical': 0.0045627376425855515, 'mean_word_length': 3.892193308550186, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3254733', 'n_tokens_mistral': 506, 'n_tokens_neox': 447, 'n_words': 89}