Last active
May 23, 2016 16:29
-
-
Save ZackMattor/ff0f2c2d992ef76fa333a2c8a6029999 to your computer and use it in GitHub Desktop.
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
| ;(function($, Pusher) { | |
| /* Resets all callbacks */ | |
| Pusher.prototype.reset = function() { | |
| $.each(this.channels.channels, function(name, channel) { | |
| channel.callbacks._callbacks = {} | |
| }) | |
| } | |
| $(document).on('pjax:send', function() { | |
| $.each(Pusher.instances, function(index, instance) { | |
| instance.reset() | |
| }) | |
| }) | |
| })(jQuery, Pusher); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment