Created
July 9, 2013 17:53
-
-
Save jasonmcleod/5959565 to your computer and use it in GitHub Desktop.
Roger consumer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src='//code.jquery.com/jquery-1.10.2.min.js'></script> | |
| <script src='//cdn.jsdelivr.net/jquery.cookie/1.3.1/jquery.cookie.js'></script> | |
| <!-- .--- change to your roger server --> | |
| <script src='http://localhost:4000/socket.io/socket.io.js'></script> | |
| <script> | |
| var socket; | |
| $(function() { // .--- change to your roger server | |
| socket = io.connect('http://localhost:4000'); | |
| socket.on('info', function(info) { | |
| console.log(info) | |
| if(info.indexOf('login successful') >-1) socket.emit('add','GOOG'); | |
| }); | |
| socket.emit('auth', $.cookie('tkToken')) | |
| socket.on('quotes', function(quotes) { | |
| console.log(quotes) | |
| }); | |
| }) | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment