Commit f79e8e1d authored by Bernward's avatar Bernward
Browse files

update JS

parent 6e13286f
......@@ -16,4 +16,4 @@ $$\frac{a}{b}$$
![Nice video](youtube://iSmkqocn0oQ)
# Much more content
![Serious Cartoon](https://24t9d72kcs873my15o9hr1pu-wpengine.netdna-ssl.com/wp-content/uploads/2017/04/toggl-how-to-kill-the-dragon-with-9-programming-languages.jpg){width=100%}
\ No newline at end of file
![Serious Cartoon](https://24t9d72kcs873my15o9hr1pu-wpengine.netdna-ssl.com/wp-content/uploads/2017/04/toggl-how-to-kill-the-dragon-with-9-programming-languages.jpg){width=100%}
......@@ -3,14 +3,14 @@ let editor;
//the same as above but for the slides
let handout;
let socket;
//let socket;
//this is for establishing the websocket connection and initializing the slide-content
//const socket = io.connect(window.location.host + '?project=' + project);
const socket = io.connect(window.location.host + '?project=' + project);
//get the initial value of the editable content from the server
//socket.on('initialize', (data) => {
// editor.setValue(data);
//});
socket.on('initialize', (data) => {
editor.setValue(data);
});
//this is for sending files to the server without a html form
//source: https://stackoverflow.com/questions/19617996/file-upload-without-form
......@@ -59,11 +59,11 @@ $( () => {
lineWrapping: true
});
//this is for establishing the websocket connection and initializing $
socket = io.connect(window.location.host + '?project=' + project);
//socket = io.connect(window.location.host + '?project=' + project);
//get the initial value of the editable content from the server
socket.on('initialize', (data) => {
editor.setValue(data);
});
//socket.on('initialize', (data) => {
// editor.setValue(data);
//});
//this is the eventhandler if anything is changed by the user in the editor
//documentation: https://codemirror.net/doc/manual.html#events_change
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment