<commit_before>(function($) {
    "use strict";
    var style = {
            "menuStyle": {
                "position": "absolute",
                "backgroundColor": "#ffffff",
                "opacity": "1",
                "right": "-70px",
                "top": "0px",
                "width": "100px",
                "zIndex": "500",
                "color": "#000000",
                "padding": "3px",
                "border": "1px solid #000000",
                "font-family": "verdana,sans-serif",
                "font-size": "0.8em"
            }
        },
        menu = $("<div>Enter Desktop Mode</div>")
                   .hide()
                   .css(style.menuStyle)
                   .bind("click", function(event) {
                       event.stopPropagation();
                   }),
        timeoutId = undefined;
    
    function hideMenu() {
        menu.animate({ "right": "-70px" }, 100, function() { menu.hide(); });
    }
    
    function applyHoverStyle() {
        $(this).css(style.itemHoverStyle);
    }
    
    function removeHoverStyle() {
        $(this).css(style.itemStyle);
    }
    
    function showMenu() {
        if (timeoutId) {
            window.clearTimeout(timeoutId);
            timeoutId = undefined;
        }
        if (!menu.is(":visible")) {
            menu.show();
            menu.animate({ "right": "0px" }, 200);
        }
        timeoutId = window.setTimeout(hideMenu, 500);
    }
    
    $(document).ready(function() {
        menu.appendTo("body");
    });
    
    $.fn.flyMenu = function() {
        $(this).bind("mousemove", function(event) {
            showMenu();
            return false;
        });
        return this;
    };
})(jQuery);<commit_msg>how about a fly-out menu with a click handler?<commit_after>(function($) {
    "use strict";
    var style = {
            "menuStyle": {
                "position": "absolute",
                "backgroundColor": "#ffffff",
                "opacity": "1",
                "top": "-50px",
                "right": "0px",
                "zIndex": "500",
                "cursor": "pointer",
                "color": "#000000",
                "padding": "3px",
                "border": "1px solid #000000",
                "font-family": "verdana,sans-serif",
                "font-size": "0.8em"
            }
        },
        menuAction = function() { },
        menu = $("<div>Enter Desktop Mode</div>")
                   .hide()
                   .css(style.menuStyle)
                   .bind("click", function(event) {
                       event.stopPropagation();
                       menuAction();
                   }),
        timeoutId = undefined;
    
    function hideMenu() {
        menu.animate({ "top": "-50px" }, 100, function() { menu.hide(); });
    }
    
    function applyHoverStyle() {
        $(this).css(style.itemHoverStyle);
    }
    
    function removeHoverStyle() {
        $(this).css(style.itemStyle);
    }
    
    function showMenu() {
        if (timeoutId) {
            window.clearTimeout(timeoutId);
            timeoutId = undefined;
        }
        if (!menu.is(":visible")) {
            menu.show();
            menu.animate({ "top": "0px" }, 200);
        }
        timeoutId = window.setTimeout(hideMenu, 500);
    }
    
    $(document).ready(function() {
        menu.appendTo("body");
    });
    
    $.fn.flyMenu = function(clickHandler) {
        menuAction = function() {};
        if (typeof clickHandler === "function") {
            menuAction = clickHandler;
        }
        
        $(this).bind("mousemove", function(event) {
            showMenu();
            return false;
        });
        return this;
    };
})(jQuery);
{'fraction_non_alphanumeric': 0.15828877005347594, 'fraction_numerical': 0.019518716577540108, 'mean_word_length': 1.355793450881612, 'pattern_counts': {'":': 32, '<': 7, '<?xml version=': 0, '>': 7, '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': '7139906', 'n_tokens_mistral': 1106, 'n_tokens_neox': 1014, 'n_words': 190}