parent
14d8f73532
commit
3ad7ad203b
@ -1,9 +1,16 @@ |
||||
/** |
||||
* Global functions for electron app |
||||
*/ |
||||
var ipc = require('electron').ipcRenderer; |
||||
|
||||
// Set app bagde
|
||||
var setElectronBadge = function(value) { |
||||
// Check ipc
|
||||
if (ipc && typeof ipc.send === 'function') { |
||||
// Send new badge value
|
||||
ipc.send('badge', value); |
||||
} |
||||
}; |
||||
|
||||
// Export global variables and functions
|
||||
global.setElectronBadge = setElectronBadge; |
||||
|
Loading…
Reference in new issue