Last active
January 14, 2019 19:42
Revisions
-
aklinkert renamed this gist
Jul 30, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
aklinkert revised this gist
Jul 30, 2015 . 1 changed file with 17 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ // pre 1.0 (function() { var emit = socket.emit; socket.emit = function() { @@ -9,4 +10,19 @@ console.log('***','on',Array.prototype.slice.call(arguments)); $emit.apply(socket, arguments); }; })(); //post 1.0 (function () { var emit = socket.emit, onevent = socket.onevent; socket.emit = function () { console.log('***', 'emit', Array.prototype.slice.call(arguments)); emit.apply(socket, arguments); }; socket.onevent = function (packet) { console.log('***', 'on', Array.prototype.slice.call(packet.data || [])); onevent.apply(socket, arguments); }; }()); -
aklinkert created this gist
Jan 28, 2014 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ (function() { var emit = socket.emit; socket.emit = function() { console.log('***','emit', Array.prototype.slice.call(arguments)); emit.apply(socket, arguments); }; var $emit = socket.$emit; socket.$emit = function() { console.log('***','on',Array.prototype.slice.call(arguments)); $emit.apply(socket, arguments); }; })();