Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
<button onclick="subscribe_channel('test_channel')">Subscribe</button>
<button onclick="unsubscribe_channel('test_channel')">Unsubscribe</button>
<script src="http://js.pusher.com/2.2/pusher.min.js"></script>
<script>
  Pusher.log = function(msg){
    console.log(msg);
  };
  var YOUR_APP_KEY = "1afb3f8f61eb29da86df";
  var pusher = new Pusher(YOUR_APP_KEY);
  function subscribe_channel( channelName ) {
    pusher.subscribe( channelName );
  }
  function unsubscribe_channel(channelName) {
    pusher.unsubscribe(channelName);
  }
</script>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
leggetterpro
0viewers