<commit_before>import { withPluginApi, decorateCooked } from 'discourse/lib/plugin-api';

function toBox($elem) {
    if ($elem == undefined || $elem == null || !$($elem).is("a")) { return; }
    $($elem).each(function(i, el) {
        $(el).linkToKokoroBox();
    });
}

function initializeBox(api) {
    console.log(siteSettings);
    api.decorateCooked(t => toBox($(t).find("a")));

}

export default {
    name: "kokoro-box",
    initialize(container) {
        const siteSettings = container.lookup('site-settings:main');
        if (siteSettings.kokoro_box_enabled) {
            withPluginApi('0.5', initializeBox);
        }
    }
};<commit_msg>fixxed new api-structure<commit_after>import { withPluginApi, decorateCooked } from 'discourse/lib/plugin-api';

function toBox($elem, settings) {
    if ($elem == undefined || $elem == null || !$($elem).is("a")) { return; }
    $($elem).each(function(i, el) {
        $(el).linkToKokoroBox(settings);
    });
}

function initializeBox(api) {
    var settings = api.container.lookup('site-settings:main');
    api.decorateCooked(t => toBox($(t).find("a"), settings));

}

export default {
    name: "kokoro-box",
    initialize(container) {
        const siteSettings = container.lookup('site-settings:main');
        if (siteSettings.kokoro_box_enabled) {
            withPluginApi('0.5', initializeBox);
        }
    }
};
{'fraction_non_alphanumeric': 0.1793754538852578, 'fraction_numerical': 0.002904865649963689, 'mean_word_length': 3.459546925566343, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6123807', 'n_tokens_mistral': 455, 'n_tokens_neox': 447, 'n_words': 74}