node.js - Prevent multiple tray icons in Node Webkit? -


is there way check if tray icon exists given app in node webkit (on osx)?

my problem looks this: multiple tray icons created node webkit app

code used create tray icon:

// create tray icon if (os_platform === 'darwin'){ //better icon windows, correct size mac     var tray = new gui.tray({ title: '', icon: 'icon-mac.png', tooltip:    'r' }); } else {     var tray = new gui.tray({ title: '', icon: 'icon-win.png', tooltip: 'r' }); } 

this trick.

window.onbeforeunload = function(){    tray.remove(); }; 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -