<commit_before>function componentToHex(c) {
    var hex = c.toString(16);
    return hex.length == 1 ? "0" + hex : hex;
}

function hslToRgb(h, s, l){
    var r, g, b;

    if(s == 0){
        r = g = b = l;
    } else {
        function hue2rgb(p, q, t){
            if(t < 0) t += 1;
            if(t > 1) t -= 1;
            if(t < 1/6) return p + (q - p) * 6 * t;
            if(t < 1/2) return q;
            if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
            return p;
        }
        var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
        var p = 2 * l - q;
        r = hue2rgb(p, q, h + 1/3);
        g = hue2rgb(p, q, h);
        b = hue2rgb(p, q, h - 1/3);
    }
    return "#" + componentToHex(Math.round(r * 255)) + componentToHex(Math.round(g * 255)) + componentToHex(Math.round(b * 255));
}

theme = {
    "sidebar": function(mode) {
        return; //Don't need this any more
        if (mode === 0) {
            setTimeout(function() {
                bkg.css('display', 'block');
            }, 200);
        } else {
            bkg.css('display', 'none')
        }
    },
    "draw": function(data) {
        $('#stationAdder,.noUi-base').css('background', 'hsl(' + data.color.join(',') + '%)');
        var hsl = data.color[0] + ',' + data.color[1] + ',' + Math.min(data.color[2] + (data.dark ? -10 : 10), 100) + '%';
        $('.fancyInput,.noUi-background').css('background-color', 'hsl(' + hsl + ')');
        $('.sidr .container').css('background-color', 'hsla(' + hsl + ',0.675)');
        var str = data.songName + '<br>' + data.artistName;
        if (data.albumName !== null) str += ' - ' + data.albumName;
        $('#sagText').html(str);
        $('.noUi-handle').css('background-color', light ? 'black' : 'white');
        px = parseFloat(getComputedStyle(document.documentElement).fontSize);
        var blurRad;
        
        if (data.albumUrl == '/img/noAlbum.png' || typeof data.albumUrl === 'undefined') {
            var pattern = GeoPattern.generate(data.artistName + data.songName, {
                color: hslToRgb(color[0]/360, parseFloat(color[1].substring(0, color[1].length - 1))/100, color[2]/100)
            });
            $('#frost').css({
                'background-image': pattern.toDataUrl(),
                'background-size': 'auto'
            });
            $('#background').css({
                'z-index': 0,
                'width': '100%',
                'height': '100%'
            });
            blurRad = 0.5;
        } else {
            $('#frost').css({
                'background-image': 'url("' + data.albumUrl + '")',
                'background-size': 'cover cover'
            });
            $('#background').css({
                'z-index': -1,
                'width': 'auto',
                'height': 'auto'
            });
            blurRad = 6;
        }
        
        $('#frost').css({
            filter: 'blur(' + blurRad * px + 'px)',
            '-webkit-filter': 'blur(' + blurRad * px + 'px)'
        });<commit_msg>Cleaned up the frostedGlass theme Also fixed a bug that made the album tile in the background<commit_after>theme = {
    "sidebar": function(mode) { },
    "draw": function(data) {
        $('#stationAdder,.noUi-base').css('background', 'hsl(' + data.color.join(',') + '%)');
        var hsl = data.color[0] + ',' + data.color[1] + ',' + Math.min(data.color[2] + (data.dark ? -10 : 10), 100) + '%';
        $('.fancyInput,.noUi-background').css('background-color', 'hsl(' + hsl + ')');
        $('.sidr .container').css('background-color', 'hsla(' + hsl + ',0.675)');
        var str = data.songName + '<br>' + data.artistName;
        if (data.albumName !== null) str += ' - ' + data.albumName;
        $('#sagText').html(str);
        $('.noUi-handle').css('background-color', light ? 'black' : 'white');
        px = parseFloat(getComputedStyle(document.documentElement).fontSize);
        var blurRad;

        if (data.albumUrl == '/img/noAlbum.png' || typeof data.albumUrl === 'undefined') {
            var pattern = GeoPattern.generate(data.artistName + data.songName, {
                color: tinycolor('hsl(' + data.color.join(',') + '%)').toHexString()
            });
            $('#frost').css({
                'background-image': pattern.toDataUrl(),
                'background-size': 'auto'
            });
            $('#background').css({
                'z-index': 0,
                'width': '100%',
                'height': '100%'
            });
            blurRad = 0.5;
        } else {
            $('#frost').css({
                'background-image': 'url("' + data.albumUrl + '")',
                'background-size': 'cover'
            });
            $('#background').css({
                'z-index': -1,
                'width': 'auto',
                'height': 'auto'
            });
            blurRad = 6;
        }

        $('#frost').css({
            filter: 'blur(' + blurRad * px + 'px)',
            '-webkit-filter': 'blur(' + blurRad * px + 'px)'
        });
{'fraction_non_alphanumeric': 0.20401271354787445, 'fraction_numerical': 0.021652761223678985, 'mean_word_length': 1.6626123744050767, 'pattern_counts': {'":': 4, '<': 10, '<?xml version=': 0, '>': 6, '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': '4989584', 'n_tokens_mistral': 1708, 'n_tokens_neox': 1614, 'n_words': 331}