<commit_before><script>
    $(function () {
        function select(event, ui) {
            var ia = ui.item.children('a')[0];
            var url = ia.getAttribute('url');
            var tconfirm = ia.getAttribute('confirm');
            var target = ia.getAttribute('target');
            var confirmated = true;
            if (tconfirm) {
                if (!confirm(tconfirm)) {
                    confirmated = false;
                }
            }
            if (confirmated) {
                if (target == 'finfo' && url) {
                    if (parent.finfo[famid] && parent.finfo[famid].location) {
                        parent.finfo[famid].location = url;
                    } else {
                        window.open(url, target);
                    }
                } else if (target !== "_overlay" && url) {
                    window.open(url, target);
                }
            }
        }

        function adjustFixed() {
            if (!isIE6) {
                var barH = $('#bar1').height();
                $('#fakeBarMenu').css("height", barH + 'px');
            }
            $(".ui-menubar ul.ui-menu").css("max-height", ($(window).height() - 50) + "px");
        }

        $("#bar1").menubar({
            position : {
                within : $("#mainbarmenu").add(window).first()
            },
            select :   select
        });
        $(window).resize(function () {
            adjustFixed()
        });
        adjustFixed()
    });
</script>
<style>
    #bar1 {
        margin: 0 0 10px;
    }
[IFNOT ISIE6]
    div.menu {
         position:fixed;
         width:100%;
    }
[ENDIF ISIE6]
    div.menu .ui-menubar-item {
      font-size:80%
    }
    div.menu a:link,div.menu a:visited, div[role="button"] a {
        color:[COLOR_BLACK];
        text-decoration:none;
    }
[IF ISIE6]
    div.menu a {
            color:[COLOR_BLACK]!important;
            text-decoration:none;
            border:none;
        }
    div.menu .ui-menubar .ui-menubar-link {
      border-left: none;
      border-right: 1px solid [COLOR_A5];
    }
[ENDIF ISIE6]
    .ui-menubar ul.ui-menu {
        overflow:auto;
        [IFNOT ISIE6] width:auto; [ENDIF ISIE6]
        [IF ISIE6] width:inherit; [ENDIF ISIE6]
        min-width:130px;
    }
</style>
<div id="mainbarmenu" class="menu">
    <ul id="bar1" class="menubar">
        [familyMenu]
    </ul>
</div>

[IFNOT ISIE6]
<div id="fakeBarMenu" style="margin-bottom:10px">&nbsp;</div>
[ENDIF ISIE6]

<iframe name="fhidden" style="display:none" src="about:blank"></iframe>

<commit_msg>Beautify barmenu (refs #3693)<commit_after><script>
    $(document).ready(function () {
        function select(event, ui) {
            var ia = ui.item.children('a')[0];
            var url = ia.getAttribute('url');
            var tconfirm = ia.getAttribute('confirm');
            var target = ia.getAttribute('target');
            var confirmated = true;
            if (tconfirm) {
                if (!confirm(tconfirm)) {
                    confirmated = false;
                }
            }
            if (confirmated) {
                if (target == 'finfo' && url) {
                    if (parent.finfo[famid] && parent.finfo[famid].location) {
                        parent.finfo[famid].location = url;
                    } else {
                        window.open(url, target);
                    }
                } else if (target !== "_overlay" && url) {
                    window.open(url, target);
                }
            }
        }

        function adjustFixed() {
            if (!isIE6) {
                var barH = $('#bar1').height();
                $('#fakeBarMenu').css("height", barH + 'px');
            }
            $(".ui-menubar ul.ui-menu").css("max-height", ($(window).height() - 50) + "px");
        }

        $("#bar1").menubar({
            position : {
                within : $("#mainbarmenu").add(window).first()
            },
            select :   select
        });
        $(window).resize(function () {
            adjustFixed();
        });
        adjustFixed();
    });
</script>
<style>
    #bar1 {
        margin: 0 0 10px;
    }
[IFNOT ISIE6]
    div.menu {
         position:fixed;
         width:100%;
    }
[ENDIF ISIE6]
    div.menu .ui-menubar-item {
      font-size:80%
    }
    div.menu a:link,div.menu a:visited, div[role="button"] a {
        color:[COLOR_BLACK];
        text-decoration:none;
    }
[IF ISIE6]
    div.menu a {
            color:[COLOR_BLACK]!important;
            text-decoration:none;
            border:none;
        }
    div.menu .ui-menubar .ui-menubar-link {
      border-left: none;
      border-right: 1px solid [COLOR_A5];
    }
[ENDIF ISIE6]
    .ui-menubar ul.ui-menu {
        overflow:auto;
        [IFNOT ISIE6] width:auto; [ENDIF ISIE6]
        [IF ISIE6] width:inherit; [ENDIF ISIE6]
        min-width:130px;
    }
</style>
<div id="mainbarmenu" class="menu">
    <ul id="bar1" class="menubar">
        [familyMenu]
    </ul>
</div>

[IFNOT ISIE6]
<div id="fakeBarMenu" style="margin-bottom:10px">&nbsp;</div>
[ENDIF ISIE6]

<iframe name="fhidden" style="display:none;" src="[IMG:1x1.gif]"></iframe>


{'fraction_non_alphanumeric': 0.15567941572169902, 'fraction_numerical': 0.01422256390543917, 'mean_word_length': 1.5286686103012634, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '1661511', 'n_tokens_mistral': 1730, 'n_tokens_neox': 1624, 'n_words': 299}