Created
June 22, 2014 12:08
-
-
Save v6ak/b3426f858b12723334fa to your computer and use it in GitHub Desktop.
This file contains 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
// An ugly hack for Bittorrent sync; hope to write more later | |
// separate function for easier debugging | |
show = function(x){console.log(["X:"+x.folders.map(function(x){return {folder: x, active_peers: x.peers.filter(function(peer){return peer.down_diff || peer.up_diff;})};}).filter(function(x){return x.active_peers.length > 0;}).map(function(x){return x.folder.name;})])} | |
var origRequest = utWebUI.request; utWebUI.request= function(a, e, d, b){return origRequest.call(this, a, function(f){e && e(f); console.log(f.folders);}, d, b); }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment