<commit_before>/*******************************************************************************
**
** Copyright (C) 2012 Typhos
**
** This Source Code Form is subject to the terms of the Mozilla Public
** License, v. 2.0. If a copy of the MPL was not distributed with this
** file, You can obtain one at http://mozilla.org/MPL/2.0/.
**
*******************************************************************************/

if(localStorage.prefs === undefined) {
    localStorage.prefs = JSON.stringify({
        "enableNSFW": false,
        "enableExtraCSS": true
    });
}

chrome.extension.onMessage.addListener(function(request, sender, sendResponse) {
    switch(request.method) {
        case "getPrefs":
            sendResponse(localStorage.prefs);
            break;

        default:
            console.log("ERROR: Unknown request from content script: " + message.request);
            break;
    }
});<commit_msg>Fixed Chrome prefs<commit_after>/*******************************************************************************
**
** Copyright (C) 2012 Typhos
**
** This Source Code Form is subject to the terms of the Mozilla Public
** License, v. 2.0. If a copy of the MPL was not distributed with this
** file, You can obtain one at http://mozilla.org/MPL/2.0/.
**
*******************************************************************************/

if(localStorage.prefs === undefined) {
    localStorage.prefs = JSON.stringify({
        "enableNSFW": false,
        "enableExtraCSS": true
    });
}

chrome.extension.onMessage.addListener(function(request, sender, sendResponse) {
    switch(request.method) {
        case "getPrefs":
            sendResponse(JSON.parse(localStorage.prefs));
            break;

        default:
            console.log("ERROR: Unknown request from content script: " + message.request);
            break;
    }
});
{'fraction_non_alphanumeric': 0.27439353099730457, 'fraction_numerical': 0.00862533692722372, 'mean_word_length': 3.504854368932039, 'pattern_counts': {'":': 6, '<': 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': '4360521', 'n_tokens_mistral': 486, 'n_tokens_neox': 451, 'n_words': 130}