nl_tokens: Hooking the sync
pl_tokens: function hookSync ( rs ) { if ( rs . _dropboxOrigSync ) { return ; } // already hooked rs . _dropboxOrigSync = rs . sync . sync . bind ( <mask> . sync ) ; rs . sync . sync = function ( ) { return this . dropbox . fetchDelta . apply ( this . dropbox , arguments ) . then ( rs . _dropboxOrigSync , function ( err ) { rs . _emit ( 'error' , new Sync . SyncError ( err ) ) ; rs . _emit ( 'sync-done' ) ; } ) ; } . bind ( rs ) ; }