client.js 345 B

123456789101112
  1. (function() {
  2. var socketId = multiplex.id;
  3. var socket = io.connect(multiplex.url);
  4. socket.on(multiplex.id, function(data) {
  5. // ignore data from sockets that aren't ours
  6. if (data.socketId !== socketId) { return; }
  7. if( window.location.host === 'localhost:1947' ) return;
  8. Reveal.navigateTo(data.indexh, data.indexv, false);
  9. });
  10. }());