From 9b228eea6b6be7afd19e524f2dcd73ac2bd6ef80 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 7 Mar 2016 11:36:33 +0100 Subject: [PATCH] modify vdom main.js to adhere to new realtime-input api --- www/vdom/main.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/www/vdom/main.js b/www/vdom/main.js index 2cf9b894c..08592bca6 100644 --- a/www/vdom/main.js +++ b/www/vdom/main.js @@ -165,6 +165,21 @@ define([ }; var realtimeOptions = { + // the textarea that we will sync + textarea: $textarea[0], + + // the websocket URL (deprecated?) + websocketURL: Config.websocketURL, + + // our username + userName: userName, + + // the channel we will communicate over + channel: key.channel, + + // our encryption key + cryptKey: key.cryptKey, + // configuration :D doc: inner, // first thing called @@ -183,12 +198,7 @@ define([ // pass in websocket/netflux object TODO }; - var rti = window.rti = realtimeInput.start($textarea[0], // synced element - Config.websocketURL, // websocketURL, ofc - userName, // userName - key.channel, // channelName - key.cryptKey, // key - realtimeOptions); + var rti = window.rti = realtimeInput.start(realtimeOptions); $textarea.val(JSON.stringify(Convert.dom.to.hjson(inner)));