Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.54 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <head>
  3.   <title>Pusher Test</title>
  4.   <script src="//js.pusher.com/2.2/pusher.min.js"></script>
  5.   <script>
  6.     // Enable pusher logging - don't include this in production
  7.     Pusher.log = function(message) {
  8.       if (window.console && window.console.log) {
  9.        window.console.log(message);
  10.       }
  11.     };
  12.  
  13.     var pusher = new Pusher('5337fe1e6622f6924832');
  14.     var channel = pusher.subscribe('test_channel');
  15.     channel.bind('my_event', function(data) {
  16.       alert(data.message);
  17.     });
  18.   </script>
  19. </head>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement