<commit_before><!-- START of Ecocode Web Debug Toolbar -->
<?php $token = $this->getToken(); ?>

<div id="sfwdt<?php echo $token?>" class="sf-toolbar" style="display: none"></div>
<script>
    <?php echo $this->getChildHtml('base_js');?>
    (function () {
        Sfjs.load(
            'sfwdt<?php echo $token?>',
            '<?php echo Mage::getUrl('_profiler/index/toolbar', [Ecocode_Profiler_Model_Profiler::URL_TOKEN_PARAMETER => $token])?>',
            function(xhr, el) {
                el.style.display = -1 !== xhr.responseText.indexOf('sf-toolbarreset') ? 'block' : 'none';

                if (el.style.display == 'none') {
                    return;
                }

                if (Sfjs.getPreference('toolbar/displayState') == 'none') {
                    document.getElementById('sfToolbarMainContent-<?php echo $token?>').style.display = 'none';
                    document.getElementById('sfToolbarClearer-<?php echo $token?>').style.display = 'none';
                    document.getElementById('sfMiniToolbar-<?php echo $token?>').style.display = 'block';
                } else {
                    document.getElementById('sfToolbarMainContent-<?php echo $token?>').style.display = 'block';
                    document.getElementById('sfToolbarClearer-<?php echo $token?>').style.display = 'block';
                    document.getElementById('sfMiniToolbar-<?php echo $token?>').style.display = 'none';
                }

                Sfjs.renderAjaxRequests();

                /* Handle toolbar-info position */
                var toolbarBlocks = document.querySelectorAll('.sf-toolbar-block');
                for (var i = 0; i < toolbarBlocks.length; i += 1) {
                    toolbarBlocks[i].onmouseover = function () {
                        var toolbarInfo = this.querySelectorAll('.sf-toolbar-info')[0];
                        var pageWidth = document.body.clientWidth;
                        var elementWidth = toolbarInfo.offsetWidth;
                        var leftValue = (elementWidth + this.offsetLeft) - pageWidth;
                        var rightValue = (elementWidth + (pageWidth - this.offsetLeft)) - pageWidth;

                        /* Reset right and left value, useful on window resize */
                        toolbarInfo.style.right = '';
                        toolbarInfo.style.left = '';

                        if (elementWidth > pageWidth) {
                            toolbarInfo.style.left = 0;
                        }
                        else if (leftValue > 0 && rightValue > 0) {
                            toolbarInfo.style.right = (rightValue * -1) + 'px';
                        } else if (leftValue < 0) {
                            toolbarInfo.style.left = 0;
                        } else {
                            toolbarInfo.style.right = '0px';
                        }
                    };
                }
            },
            function(xhr) {
                if (xhr.status !== 0) {
                    confirm('An error occurred while loading the web debug toolbar (' + xhr.status + ': ' + xhr.statusText + ').\n\nDo you want to open the profiler?') && (window.location = '{{ path("_profiler", { "token": token }) }}');
                }
            },
            {'maxTries': 5}
        );
    })();
</script><commit_msg>master fixed toolbar alert message<commit_after><!-- START of Ecocode Web Debug Toolbar -->
<?php $token = $this->getToken(); ?>

<div id="sfwdt<?php echo $token?>" class="sf-toolbar" style="display: none"></div>
<script>
    <?php echo $this->getChildHtml('base_js');?>
    (function () {
        Sfjs.load(
            'sfwdt<?php echo $token?>',
            '<?php echo Mage::getUrl('_profiler/index/toolbar', [Ecocode_Profiler_Model_Profiler::URL_TOKEN_PARAMETER => $token])?>',
            function(xhr, el) {
                el.style.display = -1 !== xhr.responseText.indexOf('sf-toolbarreset') ? 'block' : 'none';

                if (el.style.display == 'none') {
                    return;
                }

                if (Sfjs.getPreference('toolbar/displayState') == 'none') {
                    document.getElementById('sfToolbarMainContent-<?php echo $token?>').style.display = 'none';
                    document.getElementById('sfToolbarClearer-<?php echo $token?>').style.display = 'none';
                    document.getElementById('sfMiniToolbar-<?php echo $token?>').style.display = 'block';
                } else {
                    document.getElementById('sfToolbarMainContent-<?php echo $token?>').style.display = 'block';
                    document.getElementById('sfToolbarClearer-<?php echo $token?>').style.display = 'block';
                    document.getElementById('sfMiniToolbar-<?php echo $token?>').style.display = 'none';
                }

                Sfjs.renderAjaxRequests();

                /* Handle toolbar-info position */
                var toolbarBlocks = document.querySelectorAll('.sf-toolbar-block');
                for (var i = 0; i < toolbarBlocks.length; i += 1) {
                    toolbarBlocks[i].onmouseover = function () {
                        var toolbarInfo = this.querySelectorAll('.sf-toolbar-info')[0];
                        var pageWidth = document.body.clientWidth;
                        var elementWidth = toolbarInfo.offsetWidth;
                        var leftValue = (elementWidth + this.offsetLeft) - pageWidth;
                        var rightValue = (elementWidth + (pageWidth - this.offsetLeft)) - pageWidth;

                        /* Reset right and left value, useful on window resize */
                        toolbarInfo.style.right = '';
                        toolbarInfo.style.left = '';

                        if (elementWidth > pageWidth) {
                            toolbarInfo.style.left = 0;
                        }
                        else if (leftValue > 0 && rightValue > 0) {
                            toolbarInfo.style.right = (rightValue * -1) + 'px';
                        } else if (leftValue < 0) {
                            toolbarInfo.style.left = 0;
                        } else {
                            toolbarInfo.style.right = '0px';
                        }
                    };
                }
            },
            function(xhr) {
                if (xhr.status !== 0) {
                    confirm('An error occurred while loading the web debug toolbar (' + xhr.status + ': ' + xhr.statusText + ').\n\nDo you want to open the profiler?') && (window.location = '<?php echo Mage::helper('ecocode_profiler')->getUrl($token)?>');
                }
            },
            {'maxTries': 5}
        );
    })();
</script>
{'fraction_non_alphanumeric': 0.13632992137665034, 'fraction_numerical': 0.0038569945112001186, 'mean_word_length': 1.5364936042136945, 'pattern_counts': {'":': 1, '<': 40, '<?xml version=': 0, '>': 49, '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': '1920907', 'n_tokens_mistral': 1792, 'n_tokens_neox': 1677, 'n_words': 345}