Skip to content

Commit

Permalink
Now using the options param instead of overwriting the defaults prope…
Browse files Browse the repository at this point in the history
…r like a mofo
  • Loading branch information
Louis Laugesen committed Oct 6, 2011
1 parent 04000f4 commit 6a592d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.html
Expand Up @@ -13,7 +13,7 @@

$(document).ready(function(){

$.fn.peerbind.defaults = {
var options = {
//Leaving as is allows for localhost / Local LAN IP to be used allowing empty string is in the todo
'endpointprefixes': [""],

Expand Down Expand Up @@ -44,7 +44,7 @@

//This only works for people already connected
//Will have change this to be a post back on a custom "arrived" trigger I think.
$("#nickname").peerbind("change",{
$("#nickname").peerbind(options,"change",{
peer: function(e){
//yay for globals?
nicks[e.srcPeer] = e.peerData;
Expand All @@ -56,7 +56,7 @@
});

//Bind a change event for the nickname input
$("#message").peerbind("change", {
$("#message").peerbind(options,"change", {
peer: function(e) {
addChat(e.srcPeer, e.peerData);
},
Expand Down

0 comments on commit 6a592d4

Please sign in to comment.