Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. function notebookNotification(setting)
  2. {
  3. $("#lightNotificationContainer").show();
  4. var notificationAnimation = window.setInterval('$("#darkNotificationContainer").toggle()', 1000);
  5. if(setting == 0)
  6. {
  7. window.clearInterval(notificationAnimation);
  8. $("#lightNotificationContainer").hide();
  9. $("#darkNotificationContainer").hide();
  10. }
  11. }
  12.  
  13. var intervalID;
  14. function notebookNotification(setting)
  15. {
  16. if(setting == 0)
  17. {
  18. if(intervalID) {
  19. window.clearInterval(intervalID);
  20. intervalID = null;
  21. }
  22. $("#lightNotificationContainer").hide();
  23. $("#darkNotificationContainer").hide();
  24. }
  25. else
  26. {
  27. $("#lightNotificationContainer").show();
  28. if(!intervalID) {
  29. intervalID = window.setInterval('$("#darkNotificationContainer").toggle()', 1000);
  30. }
  31. }
  32. }
  33.  
  34. var keepflashing = true;
  35. var isShowing = true;
  36. function notebookNotification()
  37. {
  38. if(!isShowing)
  39. $("#lightNotificationContainer").show();
  40. else
  41. $("#lightNotificationContainer").show();
  42.  
  43. isShowing = !isShowing;
  44.  
  45. if(keepflashing)
  46. setTimeout( function(){ notebookNotification(setting); },100);
  47. else
  48. {
  49. $("#lightNotificationContainer").hide();
  50. $("#darkNotificationContainer").hide();
  51. }
  52. }
  53.  
  54. function notebookNotification(setting)
  55. {
  56. if(setting == 0)
  57. {
  58. $("#lightNotificationContainer").hide();
  59. $("#darkNotificationContainer").hide();
  60. }
  61. else
  62. {
  63. $("#lightNotificationContainer").show();
  64. window.setInterval('$("#darkNotificationContainer").toggle()', 1000);
  65. }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement