-
-
Save tdchien/5f0a3c7d65202c047392a9a7197d9187 to your computer and use it in GitHub Desktop.
function checkUnread() { | |
console.log('checkUnread run'); | |
var msg = document.getElementById("message-tab"); | |
var img = msg.querySelector(".tab-red-dot"); | |
if ((img == null) || (img == undefined)) { | |
// rambox.clearUnreadCount(); | |
document.title = originalTitle; | |
return; | |
} | |
var src = img.attributes["src"]; | |
src = src.value; | |
// src = 'https://zalo-chat-static.zadn.vn/message_notification_more.png'; | |
t = src.replace(/https\:\/\/zalo-chat-static.zadn.vn\/message_notification_|png|\./g, ''); | |
if (t === 'more') { | |
// rambox.setUnreadCount('5+') | |
document.title = "(5+) " + originalTitle | |
} else if (t >= 1) { | |
// rambox.setUnreadCount(e) | |
document.title = "(" + t + ") " + originalTitle | |
} else { | |
// rambox.clearUnreadCount() | |
document.title = originalTitle; | |
} | |
} | |
var originalTitle = document.title; | |
setInterval(checkUnread, 3000); |
@D-Zen: Replace URL to https://chat.zalo.me. It worked for me.
@D-Zen: Replace URL to https://chat.zalo.me. It worked for me.
@kiemnx i follow your guide but nothing worked for me?
@D-Zen: Replace URL to https://chat.zalo.me. It worked for me.
@kiemnx i follow your guide but nothing worked for me?
