7
This commit is contained in:
@@ -107,6 +107,14 @@ function wsReceiveData (e) {
|
||||
update_support_chat_func(data,msg_cont)
|
||||
}
|
||||
if (data.unread_msgs_count > 0){
|
||||
if (getInfoAboutUser('screen_width') < 800){
|
||||
if (window.location.href.includes("chat") || window.location.href.includes("chat"))
|
||||
let marker_new_messages = document.querySelector(".marker_messages_mobile");
|
||||
if (marker_new_messages.classList.contains('hide')){
|
||||
marker_new_messages.classList.add('show')
|
||||
marker_new_messages.classList.remove('hide')
|
||||
}
|
||||
}
|
||||
update_count_unread_messages(data)
|
||||
}
|
||||
if (data.required_beep === true) {
|
||||
|
||||
@@ -132,7 +132,7 @@ function getTypeOfData (data) {
|
||||
}
|
||||
|
||||
|
||||
function getInfoAboutUser (){
|
||||
function getInfoAboutUser (screen_width){
|
||||
let user_type = ''
|
||||
if (screen.width <= 700){
|
||||
user_type = 'mobile'
|
||||
@@ -141,7 +141,11 @@ function getInfoAboutUser (){
|
||||
} else if (screen.width > 700 && screen.width <= 1180) {
|
||||
user_type = 'laptop'
|
||||
}
|
||||
return user_type
|
||||
if (screen_width){
|
||||
return screen.width
|
||||
} else {
|
||||
return user_type
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
Reference in New Issue
Block a user