From 696567858193532755b5e543354f2692fe3b0e8e Mon Sep 17 00:00:00 2001 From: DadaMonad Date: Tue, 18 Nov 2014 11:00:42 +0000 Subject: [PATCH] removed errors in connector. Added new connector type - this is unfinished --- examples/README.md | 4 ++-- examples/XmlExample/index.js | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/README.md b/examples/README.md index 097c0e90..1c25295d 100644 --- a/examples/README.md +++ b/examples/README.md @@ -7,7 +7,7 @@ Here you find some (hopefully) usefull examples on how to use Yatta! * [IWC Tutorial](./Iwc/) Tutorial on how to use IWC Connector. ## Demos -* [Text Editing](http://dadamonad.github.io/Yatta/TextEditing/) Simple collaborative text editing demo with PeerJs and Text Framework. -* [XML Example](http://dadamonad.github.io/Yatta/XmlExample) Collaboratively manipulate the dom with native dom-features and jQuery. +* [Text Editing](http://dadamonad.github.io/Yatta/examples/TextEditing/) Simple collaborative text editing demo with PeerJs and Text Framework. +* [XML Example](http://dadamonad.github.io/Yatta/examples/XmlExample) Collaboratively manipulate the dom with native dom-features and jQuery. * [IWC Demo](./IwcDemo/) More IWC example widgets. diff --git a/examples/XmlExample/index.js b/examples/XmlExample/index.js index 4f24ba20..309f867b 100644 --- a/examples/XmlExample/index.js +++ b/examples/XmlExample/index.js @@ -30,20 +30,21 @@ var yatta, yattaHandler; This will connect to the server owned by the peerjs team. For now, you can use my API key. */ -// var conn = {key: 'h7nlefbgavh1tt9'}; +var conn = {key: 'h7nlefbgavh1tt9'}; /** This will connect to one of my peerjs instances. I can't guaranty that this will be always up. This is why you should use the previous method with the api key, or set up your own server. */ -var conn = { +/*var conn = { host: "terrific-peerjs.herokuapp.com", port: "", // this works because heroku can forward to the right port. // debug: true, -}; +};*/ +var rid = Math.floor(Math.random()*100 + 1) -Y.createPeerJsConnector(conn, function(Connector, user_id){ +Y.createPeerJsConnector(rid, conn, function(Connector, user_id){ yatta = new Y.XmlFramework(user_id, Connector);