<commit_before>/* globals Utility, getCompletions, MarieAsm, MarieSim, DataPath, saveAs */

window.addEventListener("load", function() {
    "use strict";

    var assembleButton = document.getElementById("assemble"),
        stepButton = document.getElementById("step"),
        microStepButton = document.getElementById("microstep"),
        stepBackButton = document.getElementById("step-back"),
        runButton = document.getElementById("run"),
        rangeDelay = document.getElementById("range-delay"),
        displayDelayMs = document.getElementById("display-delay-ms"),
        restartButton = document.getElementById("restart"),
        textArea = document.getElementById("program"),
        memoryContainer = document.getElementById("memory-container"),
        memoryHeaders = document.getElementById("memory-headers"),
        memory = document.getElementById("memory"),
        statusInfo = document.getElementById("status-info"),
        outputSelect = document.getElementById("output-select"),
        outputLog = document.getElementById("output-log"),
        outputLogTab = document.querySelector("#tab-container a[href='#output-log-outer']"),
        registerLog = document.getElementById("register-log"),
        registerLogOuter = document.getElementById("register-log-outer"),
        registerLogTab = document.querySelector("#tab-container a[href='#register-log-outer']"),
        watchList = document.getElementById("watch-list"),
        uploadButton = document.getElementById("upload"),
        fileInput = document.getElementById("fileInput"),
        datapathEle = document.getElementById("datapath-diagram"),
        datapathInstructionElement = document.getElementById("datapath-display-instructions"),
        currentInstructionRegisterLog = null;

    const HEX = 0, DEC = 1, UNICODE = 2, BIN = 3;

    var defaultPrefs = {
        autocomplete: true,
        autosave: true,
        minDelay: 1,
        maxDelay: 3000,
        binaryStringGroupLength: 4,
        defaultInputMode: 'HEX',
        defaultOutputMode: 'HEX',
        defaultTheme: 'light',
        minDatapathDelay: 1000,
    };

    var prefs = $.extend(defaultPrefs);

    function newfile() {
        var clrtxt = "";
        programCodeMirror.setValue(clrtxt);
        programCodeMirror.clearHistory();
        saveFile();<commit_msg>fixed missing localstorage issue with default theme<commit_after>/* globals Utility, getCompletions, MarieAsm, MarieSim, DataPath, saveAs */

window.addEventListener("load", function() {
    "use strict";

    var assembleButton = document.getElementById("assemble"),
        stepButton = document.getElementById("step"),
        microStepButton = document.getElementById("microstep"),
        stepBackButton = document.getElementById("step-back"),
        runButton = document.getElementById("run"),
        rangeDelay = document.getElementById("range-delay"),
        displayDelayMs = document.getElementById("display-delay-ms"),
        restartButton = document.getElementById("restart"),
        textArea = document.getElementById("program"),
        memoryContainer = document.getElementById("memory-container"),
        memoryHeaders = document.getElementById("memory-headers"),
        memory = document.getElementById("memory"),
        statusInfo = document.getElementById("status-info"),
        outputSelect = document.getElementById("output-select"),
        outputLog = document.getElementById("output-log"),
        outputLogTab = document.querySelector("#tab-container a[href='#output-log-outer']"),
        registerLog = document.getElementById("register-log"),
        registerLogOuter = document.getElementById("register-log-outer"),
        registerLogTab = document.querySelector("#tab-container a[href='#register-log-outer']"),
        watchList = document.getElementById("watch-list"),
        uploadButton = document.getElementById("upload"),
        fileInput = document.getElementById("fileInput"),
        datapathEle = document.getElementById("datapath-diagram"),
        datapathInstructionElement = document.getElementById("datapath-display-instructions"),
        currentInstructionRegisterLog = null;

    const HEX = 0, DEC = 1, UNICODE = 2, BIN = 3;

    var defaultPrefs = {
        autocomplete: true,
        autosave: true,
        minDelay: 1,
        maxDelay: 3000,
        binaryStringGroupLength: 4,
        defaultInputMode: 'HEX',
        defaultOutputMode: 'HEX',
        defaultTheme: 'lighttheme',
        minDatapathDelay: 1000,
    };

    var prefs = $.extend(defaultPrefs);

    function newfile() {
        var clrtxt = "";
        programCodeMirror.setValue(clrtxt);
        programCodeMirror.clearHistory();
        saveFile();
{'fraction_non_alphanumeric': 0.12248357702903158, 'fraction_numerical': 0.005933460478915025, 'mean_word_length': 3.482431149097816, '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': '1314241', 'n_tokens_mistral': 1195, 'n_tokens_neox': 1150, 'n_words': 213}