<commit_before>/*
 * Attaches all of our CSS.
 */
function init_css(store) {
    // Most environments permit us to create <link> tags before DOMContentLoaded
    // (though Chrome forces us to use documentElement). Scriptish is one that
    // does not- there's no clear way to manipulate the partial DOM, so we delay.
    with_css_parent(function() {
        log_info("Setting up css");
        link_css("/bpmotes.css");
        link_css("/emote-classes.css");

        if(store.prefs.enableExtraCSS) {
            // Inspect style properties to determine what extracss variant to
            // apply.
            //    Firefox: <16.0 requires -moz, which we don't support
            //    Chrome (WebKit): Always needs -webkit
            //    Opera: Current stable versions are unprefixed, but need tweaks
            var style = document.createElement("span").style;

            if(style.transform !== undefined) {
                // This might actually be extracss-pure-opera for Opera Next,
                // since it requires some modified rules
                link_css("/extracss-pure.css");
            } else if(style.webkitTransform !== undefined) {
                link_css("/extracss-webkit.css");
            } else {
                log_warning("Cannot inspect vendor prefix needed for extracss.");
                // You never know, maybe it'll work
                link_css("/extracss-pure.css");
            }

            if(store.prefs.enableNSFW) {
                link_css("/combiners-nsfw.css");
            }
        }

        if(platform === "chrome-ext") {
            // Fix for Chrome, which sometimes doesn't rerender unknown emote
            // elements. The result is that until the element is "nudged" in
            // some way- merely viewing it in the Console/platform Elements<commit_msg>Fix extracss: recent Chrome versions have .transform but apparently not .animation. Hack around it for now.<commit_after>/*
 * Attaches all of our CSS.
 */
function init_css(store) {
    // Most environments permit us to create <link> tags before DOMContentLoaded
    // (though Chrome forces us to use documentElement). Scriptish is one that
    // does not- there's no clear way to manipulate the partial DOM, so we delay.
    with_css_parent(function() {
        log_info("Setting up css");
        link_css("/bpmotes.css");
        link_css("/emote-classes.css");

        if(store.prefs.enableExtraCSS) {
            // Inspect style properties to determine what extracss variant to
            // apply.
            //    Firefox: <16.0 requires -moz, which we don't support
            //    Chrome (WebKit): Always needs -webkit
            var style = document.createElement("span").style;

            if(style.webkitTransform !== undefined) {
                link_css("/extracss-webkit.css");
            } else if(style.transform !== undefined) {
                link_css("/extracss-pure.css");
            } else {
                log_warning("Cannot inspect vendor prefix needed for extracss.");
                // You never know, maybe it'll work
                link_css("/extracss-pure.css");
            }

            if(store.prefs.enableNSFW) {
                link_css("/combiners-nsfw.css");
            }
        }

        if(platform === "chrome-ext") {
            // Fix for Chrome, which sometimes doesn't rerender unknown emote
            // elements. The result is that until the element is "nudged" in
            // some way- merely viewing it in the Console/platform Elements
{'fraction_non_alphanumeric': 0.10163749294184077, 'fraction_numerical': 0.0016939582156973462, 'mean_word_length': 1.8922448979591837, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5957484', 'n_tokens_mistral': 938, 'n_tokens_neox': 882, 'n_words': 299}