diff --git a/javascript/notification.js b/javascript/notification.js index 8ddd4c5d9..3b68ffe53 100644 --- a/javascript/notification.js +++ b/javascript/notification.js @@ -2,7 +2,9 @@ let lastHeadImg = null; -notificationButton = null +let notificationButton = null; + +const regExpTempImage = /(?<=\/|\\)tmp[\w\d]{8}\.png$/gm; onUiUpdate(function(){ if(notificationButton == null){ @@ -23,6 +25,8 @@ onUiUpdate(function(){ if (headImg == null || headImg == lastHeadImg) return; + if (headImg.search(regExpTempImage) != -1) return; + lastHeadImg = headImg; // play notification sound if available