Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement