<commit_before><!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Masturbate TV">

    <link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <title>Penis Battles TV</title>
    <link href="css/bootstrap.min.css" rel="stylesheet" />
    <link href="css/site.css" rel="stylesheet" />
    <link href="css/font-awesome.min.css" rel="stylesheet" />
    <link href="css/chat.css" rel="stylesheet" />
    <script src="js/modernizr.min.js"></script>
    <script src="js/jquery.js"></script>
    <script src="http://cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.6/socket.io.min.js"></script>
</head>

    <body data-target=".navbar-custom">

        <!-- HEADER BLOCK -->
        <div class="navbar navbar-custom navbar-fixed-top" role="navigation">
            <div class="container">
                <div class="navbar-header page-scroll">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
                        <i class="fa fa-bars"></i>
                    </button>
                    <a class="navbar-brand" href="#page-top">
                        <i class="fa fa-users"></i> <span class="light">Penis</span> Battles.TV
                    </a>
                </div>

                <div class="collapse navbar-collapse navbar-right navbar-main-collapse">
                    <ul class="nav navbar-nav">
                        <li class="hidden">
                            <a href="#page-top"></a>
                        </li>
                        <li class="page-scroll">
                            <a href="#about">About</a>
                        </li>
                        <li class="page-scroll">
                            <a href="#contact">Contact</a>
                        </li>
                        <li class="page-scroll">
                            <a href="#help">Help</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <!--END HEADER BLOCK -->

        <div class="container page-container">
            <div class="row" style=""></div>
            <div class="row">
                <div class="col-md-7 col-sm-6 col-xs-12">
                    <div class="videos">
                    </div>
                </div>
                <div class="col-md-5 col-sm-6">
                    <div class="panel panel-default">
                        <div class="panel-heading">Group chat</div>
                        <div class="panel-body">
                            <ul id="chat">
                                <li class="clearfix">
                                    <div class="chat-body clearfix">
                                        <div class="header">
                                            <strong class="primary-font">Nicola</strong>
                                        </div>
                                        <p>
                                            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare
                                            dolor, quis ullamcorper ligula sodales.
                                        </p>
                                    </div>
                                </li>
                                <li class="clearfix">
                                    <div class="chat-body clearfix">
                                        <div class="header">
                                            <strong class="primary-font">You</strong>
                                        </div>
                                        <p>
                                            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare
                                            dolor, quis ullamcorper ligula sodales.
                                        </p>
                                    </div>
                                </li>
                                <li class="clearfix">
                                    <div class="chat-body clearfix">
                                        <div class="header">
                                            <strong class="primary-font">Nicola</strong>
                                        </div>
                                        <p>
                                            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare
                                            dolor, quis ullamcorper ligula sodales.
                                        </p>
                                    </div>
                                </li>
                                <li class="clearfix">
                                    <div class="chat-body clearfix">
                                        <div class="header">
                                            <strong class="primary-font">Nicola</strong>
                                        </div>
                                        <p>
                                            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare
                                            dolor, quis ullamcorper ligula sodales.
                                        </p>
                                    </div>
                                </li>
                            </ul>
                            <div class="input-group">
                                <form>
                                    <input id="text-field" type="text" class="form-control" placeholder="Enter message..."/>
                                    <span class="input-group-btn">
                                        <button class="btn btn-default" name="send">Send</button>
                                    </span>
                                </form>
                                <script>

                                    var socket = io.connect('http://127.0.0.1:2013');
                                    var room = prompt("Enter room name:");
                                    socket.emit('join', room);


                                    socket.on('message', function (message){
                                        var message_template = '<li class="clearfix"><div class="chat-body clearfix"><div class="header">'+
                                            '<strong class="primary-font">'+'Name'+'</strong></div><p>'+message+'</p></div></li>';
                                        
                                        $('#chat').append(message_template);
                                        $("html, body").animate({scrollTop: $('#chat').height()}, 500);
                                    });

                                    $('button[name="send"]').on("click", function(e){
                                        e.preventDefault();
                                        var message = $('#text-field').val();
                                        if(message.length != 0){
                                            $('#text-field').val('');
                                            socket.emit('message', message);
                                        }
                                    });

                                    $('#text-field').keyup(function(e){
                                        e.preventDefault();
                                        if(e.keyCode == 13){
                                            var message = $('#text-field').val();
                                            if(message.length != 0){
                                                $('#text-field').val('');
                                                socket.emit('message', message);
                                            }
                                        }
                                    });
                                </script>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="row"></div>
        </div>

    </body>
</html><commit_msg>some stupid fix<commit_after><!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Masturbate TV">

    <link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <title>Penis Battles TV</title>
    <link href="css/bootstrap.min.css" rel="stylesheet" />
    <link href="css/site.css" rel="stylesheet" />
    <link href="css/font-awesome.min.css" rel="stylesheet" />
    <link href="css/chat.css" rel="stylesheet" />
    <script src="js/modernizr.min.js"></script>
    <script src="js/jquery.js"></script>
    <script src="http://cdnjs.cloudflare.com/ajax/libs/socket.io/0.9.6/socket.io.min.js"></script>
</head>

    <body data-target=".navbar-custom">

        <!-- HEADER BLOCK -->
        <div class="navbar navbar-custom navbar-fixed-top" role="navigation">
            <div class="container">
                <div class="navbar-header page-scroll">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
                        <i class="fa fa-bars"></i>
                    </button>
                    <a class="navbar-brand" href="#page-top">
                        <i class="fa fa-users"></i> <span class="light">Penis</span> Battles.TV
                    </a>
                </div>

                <div class="collapse navbar-collapse navbar-right navbar-main-collapse">
                    <ul class="nav navbar-nav">
                        <li class="hidden">
                            <a href="#page-top"></a>
                        </li>
                        <li class="page-scroll">
                            <a href="#about">About</a>
                        </li>
                        <li class="page-scroll">
                            <a href="#contact">Contact</a>
                        </li>
                        <li class="page-scroll">
                            <a href="#help">Help</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <!--END HEADER BLOCK -->

        <div class="container page-container">
            <div class="row" style=""></div>
            <div class="row">
                <div class="col-md-7 col-sm-6 col-xs-12">
                    <div class="videos">
                        <div class="videoContainer">
                            <video id="localVideo" style="height: 150px;" oncontextmenu="return false;"></video>
                            <div id="localVolume" class="volume_bar"></div>
                        </div>
                        <div id="remotes"></div>
                    </div>
                </div>
                <div class="col-md-5 col-sm-6">
                    <div class="panel panel-default">
                        <div class="panel-heading">Group chat</div>
                        <div class="panel-body">
                            <ul id="chat">
                                <li class="clearfix">
                                    <div class="chat-body clearfix">
                                        <div class="header">
                                            <strong class="primary-font">Nicola</strong>
                                        </div>
                                        <p>
                                            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare
                                            dolor, quis ullamcorper ligula sodales.
                                        </p>
                                    </div>
                                </li>
                                <li class="clearfix">
                                    <div class="chat-body clearfix">
                                        <div class="header">
                                            <strong class="primary-font">You</strong>
                                        </div>
                                        <p>
                                            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare
                                            dolor, quis ullamcorper ligula sodales.
                                        </p>
                                    </div>
                                </li>
                                <li class="clearfix">
                                    <div class="chat-body clearfix">
                                        <div class="header">
                                            <strong class="primary-font">Nicola</strong>
                                        </div>
                                        <p>
                                            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare
                                            dolor, quis ullamcorper ligula sodales.
                                        </p>
                                    </div>
                                </li>
                                <li class="clearfix">
                                    <div class="chat-body clearfix">
                                        <div class="header">
                                            <strong class="primary-font">Nicola</strong>
                                        </div>
                                        <p>
                                            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur bibendum ornare
                                            dolor, quis ullamcorper ligula sodales.
                                        </p>
                                    </div>
                                </li>
                            </ul>
                            <div class="input-group">
                                <form>
                                    <input id="text-field" type="text" class="form-control" placeholder="Enter message..."/>
                                    <span class="input-group-btn">
                                        <button class="btn btn-default" name="send">Send</button>
                                    </span>
                                </form>
                                <script>

                                    var socket = io.connect('http://127.0.0.1:2013');
                                    var room = prompt("Enter room name:");
                                    socket.emit('join', room);


                                    socket.on('message', function (message){
                                        var message_template = '<li class="clearfix"><div class="chat-body clearfix"><div class="header">'+
                                            '<strong class="primary-font">'+'Name'+'</strong></div><p>'+message+'</p></div></li>';
                                        
                                        $('#chat').append(message_template);
                                        $("html, body").animate({scrollTop: $('#chat').height()}, 500);
                                    });

                                    $('button[name="send"]').on("click", function(e){
                                        e.preventDefault();
                                        var message = $('#text-field').val();
                                        if(message.length != 0){
                                            $('#text-field').val('');
                                            socket.emit('message', message);
                                        }
                                    });

                                    $('#text-field').keyup(function(e){
                                        e.preventDefault();
                                        if(e.keyCode == 13){
                                            var message = $('#text-field').val();
                                            if(message.length != 0){
                                                $('#text-field').val('');
                                                socket.emit('message', message);
                                            }
                                        }
                                    });
                                </script>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="row"></div>
        </div>
        <script src="simplewebrtc.bundle.js"></script>
        <script>
            // grab the room from the URL
            var room = location.search && location.search.split('?')[1];

            // create our webrtc connection
            var webrtc = new SimpleWebRTC({
                // the id/element dom element that will hold "our" video
                localVideoEl: 'localVideo',
                // the id/element dom element that will hold remote videos
                remoteVideosEl: '',
                // immediately ask for camera access
                autoRequestMedia: true,
                debug: false,
                detectSpeakingEvents: true,
                autoAdjustMic: false
            });

            // when it's ready, join if we got a room from the URL
            webrtc.on('readyToCall', function () {
                // you can name it anything
                if (room) webrtc.joinRoom(room);
            });

            function showVolume(el, volume) {
                if (!el) return;
                if (volume < -45) { // vary between -45 and -20
                    el.style.height = '0px';
                } else if (volume > -20) {
                    el.style.height = '100%';
                } else {
                    el.style.height = '' + Math.floor((volume + 100) * 100 / 25 - 220) + '%';
                }
            }
            webrtc.on('channelMessage', function (peer, label, data) {
                if (data.type == 'volume') {
                    showVolume(document.getElementById('volume_' + peer.id), data.volume);
                }
            });
            webrtc.on('videoAdded', function (video, peer) {
                console.log('video added', peer);
                var remotes = document.getElementById('remotes');
                if (remotes) {
                    var d = document.createElement('div');
                    d.className = 'videoContainer';
                    d.id = 'container_' + webrtc.getDomId(peer);
                    d.appendChild(video);
                    var vol = document.createElement('div');
                    vol.id = 'volume_' + peer.id;
                    vol.className = 'volume_bar';
                    video.onclick = function () {
                        video.style.width = video.videoWidth + 'px';
                        video.style.height = video.videoHeight + 'px';
                    };
                    d.appendChild(vol);
                    remotes.appendChild(d);
                }
            });
            webrtc.on('videoRemoved', function (video, peer) {
                console.log('video removed ', peer);
                var remotes = document.getElementById('remotes');
                var el = document.getElementById('container_' + webrtc.getDomId(peer));
                if (remotes && el) {
                    remotes.removeChild(el);
                }
            });
            webrtc.on('volumeChange', function (volume, treshold) {
                //console.log('own volume', volume);
                showVolume(document.getElementById('localVolume'), volume);
            });

            // Since we use this twice we put it here
            function setRoom(name) {
                $('form').remove();
                $('h1').text(name);
                $('#subTitle').text('Link to join: ' + location.href);
                $('body').addClass('active');
            }

            if (room) {
                setRoom(room);
            } else {
                $('form').submit(function () {
                    var val = $('#sessionInput').val().toLowerCase().replace(/\s/g, '-').replace(/[^A-Za-z0-9_\-]/g, '');
                    webrtc.createRoom(val, function (err, name) {
                        console.log(' create room cb', arguments);
                    
                        var newUrl = location.pathname + '?' + name;
                        if (!err) {
                            history.replaceState({foo: 'bar'}, null, newUrl);
                            setRoom(name);
                        } else {
                            console.log(err);
                        }
                    });
                    return false;          
                });
            }

            var button = $('#screenShareButton'),
                setButton = function (bool) {
                    button.text(bool ? 'share screen' : 'stop sharing');
                };
            webrtc.on('localScreenRemoved', function () {
                setButton(true);
            });

            setButton(true);

            button.click(function () {
                if (webrtc.getLocalScreen()) {
                    webrtc.stopScreenShare();
                    setButton(true);
                } else {
                    webrtc.shareScreen(function (err) {
                        if (err) {
                            setButton(true);
                        } else {
                            setButton(false);
                        }
                    });
                    
                }
            });
        </script>

    </body>
</html>
{'fraction_non_alphanumeric': 0.1175376519687897, 'fraction_numerical': 0.003992015968063872, 'mean_word_length': 0.8182942923127681, 'pattern_counts': {'":': 0, '<': 304, '<?xml version=': 0, '>': 304, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 214, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2803013', 'n_tokens_mistral': 4888, 'n_tokens_neox': 4524, 'n_words': 958}