<commit_before>var body = document.getElementsByTagName('body')[0];
chrome.storage.sync.get({
    backgroundURL: '',
    backgroundTile: true,
    backgroundColour: '',
    backgroundType: 'image'
}, function(items) {

    var css = document.createElement("style");
    css.type = "text/css";
    var cssString = "body { ";
    css.innerHTML = "strong { color: red }";
    document.body.appendChild(css);

    if(items.backgroundColour != '')
    {
        cssString += "background-color: " + items.backgroundColour + "; ";
    }

    if(items.backgroundType == 'image') {
        cssString += "background-image: url(" + items.backgroundURL + "); "
        cssString += "background-attachment: fixed; "
        if(items.backgroundTile) {
            cssString += "background-repeat: repeat; "
        } else {
            cssString += "background-repeat: no-repeat; "
        }
    }

    css.innerHTML = cssString;
    document.body.appendChild(css);
});<commit_msg>Added per-user functionality to content script<commit_after>var body = document.getElementsByTagName('body')[0];
chrome.storage.sync.get({
    backgroundURL: '',
    backgroundTile: true,
    backgroundColour: '',
    backgroundType: 'image',
    userOptions: []
}, function(items) {

    var css = document.createElement("style");
    css.type = "text/css";
    var cssString = "body { ";

    bgURL = items.backgroundURL;
    bgTile = items.backgroundTile;
    bgColour = items.backgroundColour;
    bgType = items.backgroundType;

    for (var i in items.userOptions) {
        userOption = items.userOptions[i];
        if(document.getElementsByClassName('user-style-' + userOption[0])[0] != null) {
            bgURL = userOption[1];
            bgTile = userOption[2];
            bgColour = userOption[3];
            bgType = userOption[4];
        }
    }


    if(bgColour != '')
    {
        cssString += "background-color: " + bgColour + "; ";
    }

    if(bgType == 'image') {
        cssString += "background-image: url(" + bgURL + "); "
        cssString += "background-attachment: fixed; "
        if(bgTile) {
            cssString += "background-repeat: repeat; "
        } else {
            cssString += "background-repeat: no-repeat; "
        }
    }

    css.innerHTML = cssString;
    document.body.appendChild(css);
});
{'fraction_non_alphanumeric': 0.14915693904020752, 'fraction_numerical': 0.0034587116299178555, 'mean_word_length': 2.582043343653251, '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': '3360408', 'n_tokens_mistral': 688, 'n_tokens_neox': 675, 'n_words': 123}