From 6374f9ec98a132a810efa3e651bd800bcf541340 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Mon, 15 Sep 2014 16:19:12 +0200 Subject: Use setTimeout instead of setInterval (JavaScript) See https://github.com/marienfressinaud/FreshRSS/pull/585 --- p/scripts/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'p/scripts') diff --git a/p/scripts/main.js b/p/scripts/main.js index 2108eece2..6eb7fdd72 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -787,7 +787,7 @@ function openNotification(msg, status) { notification.find(".msg").html(msg); notification.fadeIn(300); - notification_interval = window.setInterval(closeNotification, 4000); + notification_interval = window.setTimeout(closeNotification, 4000); } function closeNotification() { @@ -810,7 +810,7 @@ function init_notifications() { if (notification.find(".msg").html().length > 0) { notification_working = true; - notification_interval = window.setInterval(closeNotification, 4000); + notification_interval = window.setTimeout(closeNotification, 4000); } } // @@ -1224,7 +1224,7 @@ function init_all() { faviconNbUnread(); init_print_action(); init_notifs_html5(); - window.setInterval(refreshUnreads, 120000); + window.setTimeout(refreshUnreads, 120000); } else { init_share_observers(); init_remove_observers(); -- cgit v1.2.3