From cf0a8ab999398a75a3a86e9624d7e1f578d72dd1 Mon Sep 17 00:00:00 2001 From: Balthasar Schachtner Date: Tue, 11 Jun 2019 16:07:56 +0200 Subject: [PATCH] only alert owa if number of mails increases --- owa.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/owa.js b/owa.js index e07acb8..eeea8e4 100644 --- a/owa.js +++ b/owa.js @@ -5,7 +5,7 @@ // @updateURL https://gitea.bmsch.de/balthasar/Scripts/raw/branch/master/owa.js // @downloadURL https://gitea.bmsch.de/balthasar/Scripts/raw/branch/master/owa.js // @grant none -// @version 1.0.0 +// @version 1.1.0 // ==/UserScript== Notification.requestPermission().then(function(result) { @@ -40,7 +40,7 @@ window.setInterval(function(){ document.title = "("+nMails+') ' + document.title } if (nMails > 0){ - if (notified !== nMails) { + if (notified < nMails) { //console.log("OWA: "+nMails+" new mails") var img = 'https://webmail.med.uni-muenchen.de/owa/prem/15.0.1365.1/resources/images/0/favicon.ico'; var n = new Notification("New mails on OWA: "+nMails, {icon:img});