From b8fb677d114a99fa26bbef38ff993af5c289e91f Mon Sep 17 00:00:00 2001 From: Yuya Ochiai Date: Sat, 10 Oct 2015 17:24:40 +0900 Subject: [PATCH] =?UTF-8?q?OS=20X=E3=81=A7=E3=81=AF=E6=9C=AA=E8=AA=AD?= =?UTF-8?q?=E3=83=81=E3=83=A3=E3=83=B3=E3=83=8D=E3=83=AB=E6=95=B0=E3=82=92?= =?UTF-8?q?=E3=83=89=E3=83=83=E3=82=AF=E3=82=A2=E3=82=A4=E3=82=B3=E3=83=B3?= =?UTF-8?q?=E3=81=AB=E3=83=90=E3=83=83=E3=82=B8=E3=81=A7=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/index.js b/index.js index 3bc14261..d0a3458a 100644 --- a/index.js +++ b/index.js @@ -51,6 +51,15 @@ var showUnreadBadge = function(unreadCount){ window.setOverlayIcon(null, ''); } break; + case 'darwin': + var app = remote.require('app'); + if(unreadCount > 0){ + app.dock.setBadge(unreadCount.toString()); + } + else{ + app.dock.setBadge(''); + } + break; default: } }