<commit_before><!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8" />
    <title>tribwire</title>
</head>
    <a href="javascript:void window.open('new_wire.html','1392408902855','width=700,height=500,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0');return false;"><button type="button">New Wire bookmarklet</button></a>

<body>

</body>
</html><commit_msg>add modal window accessed from simple link--no bookmarklet<commit_after><!-- modified from http://www.jacklmoore.com/notes/jquery-modal-tutorial/ -->
<!DOCTYPE html>

<html>

<head>
    <meta charset="utf-8" />
    <title>tribwire</title>
    <link type="text/css" rel="stylesheet" href="jquery.modalbox.css" />
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    <style>
            * {
                margin:0; 
                padding:0;
            }

            #overlay {
                position:fixed; 
                top:0;
                left:0;
                width:100%;
                height:100%;
                background:#000;
                opacity:0.5;
                filter:alpha(opacity=50);
            }

            #modal {
                position:absolute;
                background:url(tint20.png) 0 0 repeat;
                background:rgba(0,0,0,0.2);
                border-radius:14px;
                padding:8px;
            }

            #content {
                border-radius:8px;
                background:#fff;
                padding:20px;
            }

            #close {
                position:absolute;
                background:url(close.png) 0 0 no-repeat;
                width:24px;
                height:27px;
                display:block;
                text-indent:-9999px;
                top:-7px;
                right:-7px;
            }
        </style>
        <script>

        var modal = (function(){
                var 
                method = {},
                $overlay,
                $modal,
                $content,
                $close;

                // Center the modal in the viewport
                method.center = function () {
                    var top, left;

                    top = Math.max($(window).height() - $modal.outerHeight(), 0) / 2;
                    left = Math.max($(window).width() - $modal.outerWidth(), 0) / 2;

                    $modal.css({
                        top:top + $(window).scrollTop(), 
                        left:left + $(window).scrollLeft()
                    });
                };

                // Open the modal
                method.open = function (settings) {
                    $content.empty().append(settings.content);

                    $modal.css({
                        width: settings.width || 'auto', 
                        height: settings.height || 'auto'
                    });

                    method.center();
                    $(window).bind('resize.modal', method.center);
                    $modal.show();
                    $overlay.show();
                };

                // Close the modal
                method.close = function () {
                    $modal.hide();
                    $overlay.hide();
                    $content.empty();
                    $(window).unbind('resize.modal');
                };

                // Generate the HTML and add it to the document
                $overlay = $('<div id="overlay"></div>');
                $modal = $('<div id="modal"></div>');
                $content = $('<div id="content"></div>');
                $close = $('<a id="close" href="#">close</a>');

                $modal.hide();
                $overlay.hide();
                $modal.append($content, $close);

                $(document).ready(function(){
                    $('body').append($overlay, $modal);                     
                });

                $close.click(function(e){
                    e.preventDefault();
                    method.close();
                });

                return method;
            }());

            // Wait until the DOM has loaded before querying the document
            $(document).ready(function(){

                $.get('ajax.html', function(data){
                    modal.open({content: data});
                });

                $('a#addwire').click(function(e){
                    $.get('new_wire.html', function(data){
                        modal.open({content: data});
                    }); 
                    e.preventDefault();
                });
            });
        </script>
    </head>
    <body>
        <a id='addwire' href='#'>Add New TribWire</a>
    </body>
</html>
{'fraction_non_alphanumeric': 0.1440390326686466, 'fraction_numerical': 0.01697072549851506, 'mean_word_length': 1.1392921960072595, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '1350690', 'n_tokens_mistral': 1322, 'n_tokens_neox': 1161, 'n_words': 208}