Subversion Repositories SmartDukaan

Rev

Rev 14851 | Rev 14928 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14851 Rev 14858
Line 472... Line 472...
472
	setCookie(cname, d.getTime(), 365);
472
	setCookie(cname, d.getTime(), 365);
473
}
473
}
474
function incrementPopupCount(id,currentCount) {
474
function incrementPopupCount(id,currentCount) {
475
	var cname = 'notif-count-'+me+'-'+id;
475
	var cname = 'notif-count-'+me+'-'+id;
476
	setCookie(cname, parseInt(currentCount)+1, 365);
476
	setCookie(cname, parseInt(currentCount)+1, 365);
477
}
-
 
478
477
}
-
 
478
var hidden, visibilityChange; 
-
 
479
function handleVisibilityChange() {
-
 
480
  if (document[hidden]) {
-
 
481
    console.log('mujhe dekho');
-
 
482
    document.title = "Mujhe Dekho Please";
-
 
483
    var tout = setTimeout(function(){ document.location.reload(); }, 1000*60);
-
 
484
  } else {
-
 
485
    console.log('active');
-
 
486
    clearTimeout(tout);
-
 
487
  }
-
 
488
}
-
 
489
if (typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and later support 
-
 
490
  hidden = "hidden";
-
 
491
  visibilityChange = "visibilitychange";
-
 
492
} else if (typeof document.mozHidden !== "undefined") {
-
 
493
  hidden = "mozHidden";
-
 
494
  visibilityChange = "mozvisibilitychange";
-
 
495
} else if (typeof document.msHidden !== "undefined") {
-
 
496
  hidden = "msHidden";
-
 
497
  visibilityChange = "msvisibilitychange";
-
 
498
} else if (typeof document.webkitHidden !== "undefined") {
-
 
499
  hidden = "webkitHidden";
-
 
500
  visibilityChange = "webkitvisibilitychange";
-
 
501
}
-
 
502
if (typeof document.addEventListener === "undefined" || 
-
 
503
  typeof document[hidden] === "undefined") {
-
 
504
  alert("This feature requires a browser, such as Google Chrome or Firefox, that supports the Page Visibility API.");
-
 
505
} else {
-
 
506
  // Handle page visibility change   
-
 
507
  document.addEventListener(visibilityChange, handleVisibilityChange, false);
-
 
508
}    
-
 
509
$('#notificationok').on('click',function(){
-
 
510
	$('#notificationModal').modal('hide');
-
 
511
})
-
 
512
479
513