<commit_before>/*
 * echotest.js
 *
 * Derived from Echo Test of WebSocket.org (http://www.websocket.org/echo.html).
 *
 * Copyright (c) 2012 Kaazing Corporation.
 */

var url = "ws://localhost:4649/Morse";
//var url = "wss://localhost:5963/Echo";
var output;
var overlay;

window.addEventListener ("load", Init, false);

function Init () {
  output = document.getElementById ("output");
  overlay = document.getElementById ("overlay");
  //findServers();
  // DoWebSocket();
  GetLocalIP(SetIP);
}

function GetLocalIP(callback)
{
    var ip_dups = {};

    //compatibility for firefox and chrome
    var RTCPeerConnection = window.RTCPeerConnection
        || window.mozRTCPeerConnection
        || window.webkitRTCPeerConnection;
    var useWebKit = !!window.webkitRTCPeerConnection;

    //bypass naive webrtc blocking using an iframe
    if(!RTCPeerConnection){
        //NOTE: you need to have an iframe in the page right above the script tag
        //
        //<iframe id="iframe" sandbox="allow-same-origin" style="display: none"></iframe><commit_msg>trying the single ip version again<commit_after>/*
 * echotest.js
 *
 * Derived from Echo Test of WebSocket.org (http://www.websocket.org/echo.html).
 *
 * Copyright (c) 2012 Kaazing Corporation.
 */

var url = "ws://192.168.43.131:4649/Morse";
//var url = "wss://localhost:5963/Echo";
var output;
var overlay;

window.addEventListener ("load", Init, false);

function Init () {
  output = document.getElementById ("output");
  overlay = document.getElementById ("overlay");
  //findServers();
  DoWebSocket();
  // GetLocalIP(SetIP);
}

function GetLocalIP(callback)
{
    var ip_dups = {};

    //compatibility for firefox and chrome
    var RTCPeerConnection = window.RTCPeerConnection
        || window.mozRTCPeerConnection
        || window.webkitRTCPeerConnection;
    var useWebKit = !!window.webkitRTCPeerConnection;

    //bypass naive webrtc blocking using an iframe
    if(!RTCPeerConnection){
        //NOTE: you need to have an iframe in the page right above the script tag
        //
        //<iframe id="iframe" sandbox="allow-same-origin" style="display: none"></iframe>
{'fraction_non_alphanumeric': 0.13268156424581007, 'fraction_numerical': 0.016294227188081937, 'mean_word_length': 3.4864300626304803, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 1, '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': '5806879', 'n_tokens_mistral': 715, 'n_tokens_neox': 641, 'n_words': 172}