removed disconnect button for example

This commit is contained in:
Kevin Jahns 2015-11-10 18:38:21 +01:00
parent 6c13be376f
commit acfce06912
2 changed files with 1 additions and 13 deletions

View File

@ -1,7 +1,6 @@
<!DOCTYPE html>
<html>
<body>
<button id="button">Disconnect</button>
<h1 id="contenteditable" contentEditable></h1>
<textarea style="width:80%;" rows=40 id="textfield"></textarea>

View File

@ -7,7 +7,7 @@ Y({
namespace: 'offlineEditingDemo'
},
connector: {
name: 'webrtc',
name: 'websockets-client',
room: 'offlineEditingDemo',
debug: true
},
@ -38,15 +38,4 @@ Y({
if (textpromise == null) {
yconfig.root.set('text', Y.Text)
}
// We also provide a button for disconnecting/reconnecting the shared element
var button = document.querySelector('#button')
button.onclick = function () {
if (button.innerText === 'Disconnect') {
yconfig.disconnect()
button.innerText = 'Reconnect'
} else {
yconfig.reconnect()
button.innerText = 'Disconnect'
}
}
})