<commit_before>// ==UserScript==
// @name         Slack Full Theme plugin
// @namespace    http://mrkannah.com/
// @version      1.0.2
// @description  Applies the side bar colors for slack to the entire application
// @author       <NAME>
// @match        https://*.slack.com/*
// @grant        GM_setValue
// @grant        GM_getValue
// @run-at       document-end
// ==/UserScript==

$(document).ready(function(){
    var checkInterval = setInterval(function(){
        if(Ready()){
            var colors = GM_getValue('ST_Colors');
            clearInterval(checkInterval);
            if(colors){
                applyColors(colors);
                setUp(colors)
            }
            else{
                setTimeout(function(){
                    colors = getColors();
                    setTimeout(setUp(colors),300);
                },100);
            }
        }
    },200);
});

function setUp(colors){
    applyColors(colors);
    addListner();
}

function Ready(){
    return parseInt($('#loading_welcome').css('opacity')) ? 0 : 1;
}

function getColors(){
    $('#team_menu')[0].click();
    $('#member_prefs_item > a')[0].click();
    var colors = $('#sidebar_theme_custom').val().toString().split(',');
    $('.dialog_go ')[0].click();
    return colors;<commit_msg>Fixed get local storage not returning an array Fix applyColors twice when colors were store in local storage<commit_after>// ==UserScript==
// @name         Slack Full Theme plugin
// @namespace    http://mrkannah.com/
// @version      1.0.2
// @description  Applies the side bar colors for slack to the entire application
// @author       <NAME>
// @match        https://*.slack.com/*
// @grant        GM_setValue
// @grant        GM_getValue
// @run-at       document-end
// ==/UserScript==

$(document).ready(function(){
    var checkInterval = setInterval(function(){
        if(Ready()){
            var colors = GM_getValue('ST_Colors').toString().split(',');
            clearInterval(checkInterval);
            if(colors){
                setUp(colors);
            }
            else{
                setTimeout(function(){
                    colors = getColors();
                    setTimeout(setUp(colors),300);
                },100);
            }
        }
    },200);
});

function setUp(colors){
    applyColors(colors);
    addListner();
}

function Ready(){
    return parseInt($('#loading_welcome').css('opacity')) ? 0 : 1;
}

function getColors(){
    $('#team_menu')[0].click();
    $('#member_prefs_item > a')[0].click();
    var colors = $('#sidebar_theme_custom').val().toString().split(',');
    $('.dialog_go ')[0].click();
    return colors;
{'fraction_non_alphanumeric': 0.1656027037176117, 'fraction_numerical': 0.012767555388659407, 'mean_word_length': 2.10128055878929, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '1504373', 'n_tokens_mistral': 769, 'n_tokens_neox': 752, 'n_words': 165}