From 7b3f78c4279af549c1fd15617a839593acb598f0 Mon Sep 17 00:00:00 2001 From: Jeremie Date: Fri, 10 Dec 2021 08:54:08 +0100 Subject: [PATCH] Update common.js en cours --- WebApps/assets/common.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/WebApps/assets/common.js b/WebApps/assets/common.js index d969e91..b5a951a 100644 --- a/WebApps/assets/common.js +++ b/WebApps/assets/common.js @@ -67,8 +67,11 @@ var inactivityTime = function() { function timerReset() { // console.log("resetting timer"); + var idleTime = 60000 // timeout ms + if(!$('#page-web').is(":hidden")){console.log('WE ON THE WEB'); idleTime = 300000;} + else{ console.log('WE NOT ON THE WEB'); idleTime = 60000; } clearTimeout(timerInactivity); - timerInactivity = setTimeout(timerElapsed, 30000); // timeout ms + timerInactivity = setTimeout(timerElapsed, idleTime); } }; inactivityTime()