From 7d9894bef786b49e1b7c615b0e2c2b5453c88962 Mon Sep 17 00:00:00 2001 From: Rokt33r Date: Sat, 21 Nov 2015 22:07:59 +0900 Subject: [PATCH] cleanup notification code --- browser/finder/index.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/browser/finder/index.js b/browser/finder/index.js index 8ef40501..5c0b699d 100644 --- a/browser/finder/index.js +++ b/browser/finder/index.js @@ -14,10 +14,8 @@ import remote from 'remote' var hideFinder = remote.getGlobal('hideFinder') import clipboard from 'clipboard' -var notifier = require('node-notifier') -var path = require('path') -function getIconPath () { - return path.resolve(global.__dirname, '../../resources/favicon-230x230.png') +function notify (...args) { + return new window.Notification(...args) } require('../styles/finder/index.styl') @@ -66,10 +64,8 @@ class FinderMain extends React.Component { clipboard.writeText(activeArticle.content) activityRecord.emit('FINDER_COPY') - notifier.notify({ - icon: getIconPath(), - 'title': 'Saved to Clipboard!', - 'message': 'Paste it wherever you want!' + notify('Saved to Clipboard!', { + body: 'Paste it wherever you want!' }) hideFinder() }