<commit_before>var socket = io("https://remote-sli.de");
socket.on("init", function (data) {
    if (data.state == "start") {
        console.info("Initializing session #" + remote_slide.session);
        setTimeout(function () {
            socket.emit("init", {iAm: "host", session: remote_slide.session});
        }, 500);
        status("orange", "question", "");
    } else if (data.state == "success") {
        console.info("Session initialized");
        status("green", "check", "", 5000);
        session.info = data.info;
        if (session.info.remotes <= 0) {
            overlayMessage.show("Waiting for a remote to connect....");
        }
        try {
            chrome.runtime.sendMessage({action: "session_initialized"}, function (response) {
            });
        } catch (ignored) {
        }
    }


    try {
        chrome.runtime.sendMessage({action: "socketEvent", event: 'init', data: data});
    } catch (ignored) {
    }
});
socket.on("info", function (data) {
    console.log(data);
    if (data.type == 'client_connected') {
        session.info = data.info;
        if (data.clientType == 'remote') {
            overlayMessage.hide();
        }
    }
    if (data.type == 'client_disconnected') {
        session.info = data.info;
        if (data.clientType == 'remote') {
            if (session.info.remotes <= 0) {
                overlayMessage.show("Waiting for a remote to connect....");
            }
        }
    }

    try {
        chrome.runtime.sendMessage({action: "socketEvent", event: 'info', data: data});
    } catch (ignored) {
    }
});
try {
    chrome.extension.onMessage.addListener(function (msg, sender, sendResponse) {
        console.log(msg)
        if (msg.action == 'state_request') {
            chrome.runtime.sendMessage({action: "session_initialized"}, function (response) {
            });
        }
    });
} catch (ignored) {
}

var session = {
    session: remote_slide.session,
    info: {
        observer: false,
        host: false,
        remotes: 0
    }
};

var settings = {
    navigationType: 'button',
    vibration: true,
    laserCalibration: {
        center: {
            yaw: 0,
            pitch: 0
        },
        range: {
            yaw: 90,
            pitch: 90
        }
    },
    laserStyle: {
        color: "red",
        'font-size': 15<commit_msg>stuff<commit_after>var socket = io("https://remote-sli.de");
socket.on("init", function (data) {
    if (data.state == "start") {
        console.info("Initializing session #" + remote_slide.session);
        setTimeout(function () {
            socket.emit("init", {iAm: "host", session: remote_slide.session});
        }, 500);
        status("orange", "question", "");
    } else if (data.state == "success") {
        console.info("Session initialized");
        status("green", "check", "", 5000);
        session.info = data.info;
        if (session.info.remotes <= 0) {
            overlayMessage.show("Waiting for a remote to connect....");
        }
        try {
            chrome.runtime.sendMessage({action: "session_initialized"}, function (response) {
            });
        } catch (ignored) {
        }
    }


    try {
        chrome.runtime.sendMessage({action: "socketEvent", event: 'init', data: data});
        chrome.runtime.sendMessage({action: "sessionUpdate", session: session});
        chrome.runtime.sendMessage({action: "controlUpdate", active: true});
    } catch (ignored) {
    }
});
socket.on("info", function (data) {
    console.log(data);
    if (data.type == 'client_connected') {
        session.info = data.info;
        if (data.clientType == 'remote') {
            overlayMessage.hide();
        }
    }
    if (data.type == 'client_disconnected') {
        session.info = data.info;
        if (data.clientType == 'remote') {
            if (session.info.remotes <= 0) {
                overlayMessage.show("Waiting for a remote to connect....");
            }
        }
    }

    try {
        chrome.runtime.sendMessage({action: "socketEvent", event: 'info', data: data});
        chrome.runtime.sendMessage({action: "sessionUpdate", session: session});
    } catch (ignored) {
    }
});
try {
    chrome.extension.onMessage.addListener(function (msg, sender, sendResponse) {
        console.log(msg)
        if (msg.action == 'stateRequest') {
            chrome.runtime.sendMessage({action: "controlUpdate", active: true});
        }
    });
} catch (ignored) {
}
window.onunload=function() {
    console.info("UNLOAD")
    chrome.runtime.sendMessage({action: "controlUpdate", active: false});
}


var session = {
    session: remote_slide.session,
    info: {
        observer: false,
        host: false,
        remotes: 0
    }
};

var settings = {
    navigationType: 'button',
    vibration: true,
    laserCalibration: {
        center: {
            yaw: 0,
            pitch: 0
        },
        range: {
            yaw: 90,
            pitch: 90
        }
    },
    laserStyle: {
        color: "red",
        'font-size': 15
{'fraction_non_alphanumeric': 0.15655965120887833, 'fraction_numerical': 0.007134363852556481, 'mean_word_length': 2.0440289505428226, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '2630644', 'n_tokens_mistral': 1528, 'n_tokens_neox': 1468, 'n_words': 305}