SHARE
TWEET

Untitled

a guest Jun 26th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function sync(){
  2.     db.sync(remoteCouch)
  3.         .on('complete', function (info) {
  4.         var opts = {live: true};
  5.         db.sync(remoteCouch, opts).on('error', function (err) {
  6.             $('#sync-indicator').html("sync_disabled");
  7.             $('#sync-indicator').css("color", "#bb0000");
  8.         });
  9.             $('#sync-indicator').html("sync");
  10.         $('#sync-indicator').css("color", "#00bb00");
  11.     }).on('error', function (err) {
  12.         $('#sync-indicator').html("sync_disabled");
  13.         $('#sync-indicator').css("color", "#bb0000");
  14.     });
  15. }
  16.  
  17. if (remoteCouch){
  18.     sync();
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top