aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/notification-manager.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-22 08:58:58 +0800
committerDan <danjm.com@gmail.com>2018-03-22 08:58:58 +0800
commitbe845fd190ee71d2bb6e641a5c23c453668268e3 (patch)
tree28d5267d8c149b0e323351a9ebfa222de9d33bdc /app/scripts/lib/notification-manager.js
parentd24a0590d363dbe88d383c8faec8eb28809242f0 (diff)
parent04b1f8428b487663b276a541d739631954fe0be1 (diff)
downloadtangerine-wallet-browser-be845fd190ee71d2bb6e641a5c23c453668268e3.tar
tangerine-wallet-browser-be845fd190ee71d2bb6e641a5c23c453668268e3.tar.gz
tangerine-wallet-browser-be845fd190ee71d2bb6e641a5c23c453668268e3.tar.bz2
tangerine-wallet-browser-be845fd190ee71d2bb6e641a5c23c453668268e3.tar.lz
tangerine-wallet-browser-be845fd190ee71d2bb6e641a5c23c453668268e3.tar.xz
tangerine-wallet-browser-be845fd190ee71d2bb6e641a5c23c453668268e3.tar.zst
tangerine-wallet-browser-be845fd190ee71d2bb6e641a5c23c453668268e3.zip
Merge branch 'master' into i18n-translator-redux
Diffstat (limited to 'app/scripts/lib/notification-manager.js')
-rw-r--r--app/scripts/lib/notification-manager.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/scripts/lib/notification-manager.js b/app/scripts/lib/notification-manager.js
index adaf60c65..1fcb7cf69 100644
--- a/app/scripts/lib/notification-manager.js
+++ b/app/scripts/lib/notification-manager.js
@@ -13,11 +13,12 @@ class NotificationManager {
this._getPopup((err, popup) => {
if (err) throw err
+ // Bring focus to chrome popup
if (popup) {
- // bring focus to existing popup
+ // bring focus to existing chrome popup
extension.windows.update(popup.id, { focused: true })
} else {
- // create new popup
+ // create new notification popup
extension.windows.create({
url: 'notification.html',
type: 'popup',
@@ -29,6 +30,7 @@ class NotificationManager {
}
closePopup () {
+ // closes notification popup
this._getPopup((err, popup) => {
if (err) throw err
if (!popup) return
@@ -60,9 +62,8 @@ class NotificationManager {
_getPopupIn (windows) {
return windows ? windows.find((win) => {
- return (win && win.type === 'popup' &&
- win.height === height &&
- win.width === width)
+ // Returns notification popup
+ return (win && win.type === 'popup')
}) : null
}