This commit is contained in:
2023-08-11 19:02:26 +03:00
parent e60c18c2e2
commit cf5a404b46
4 changed files with 76 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ function funcFocus(){
inp.focus()
}
} else{
check_new_messages_timeout(60000)
check_new_messages_timeout(long_timeout)
}
}
@@ -25,7 +25,8 @@ function funcFocus(){
var check_msg = null
var it = 0
var short_timeout = 5000
var long_timeout = 60000
// function initial_function (){
// var it_set_func = 0
@@ -33,7 +34,7 @@ var it = 0
// check_new_messages_timeout(60000,it_set_func,it_func)
// }
function check_new_messages_timeout(timeout_time=1000){
function check_new_messages_timeout(timeout_time=short_timeout){
let window = document.querySelector(".container-messages")

View File

@@ -7,9 +7,9 @@ function getNewMessageSession(){
let new_timeout_time;
if (window_messages !== null){
// check_new_messages(window)
new_timeout_time = 1000
new_timeout_time = short_timeout
} else {
new_timeout_time = 60000
new_timeout_time = long_timeout
}
if (check_msg !== null){
clearInterval(check_msg)