|
|
@ -26,15 +26,15 @@ class NotificationManager { |
|
|
|
// bring focus to existing chrome popup
|
|
|
|
// bring focus to existing chrome popup
|
|
|
|
extension.windows.update(popup.id, { focused: true }) |
|
|
|
extension.windows.update(popup.id, { focused: true }) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
const cb = (currentPopup) => { this._popupId = currentPopup.id } |
|
|
|
// create new notification popup
|
|
|
|
// create new notification popup
|
|
|
|
extension.windows.create({ |
|
|
|
const creation = extension.windows.create({ |
|
|
|
url: 'notification.html', |
|
|
|
url: 'notification.html', |
|
|
|
type: 'popup', |
|
|
|
type: 'popup', |
|
|
|
width, |
|
|
|
width, |
|
|
|
height, |
|
|
|
height, |
|
|
|
}).then((currentPopup) => { |
|
|
|
}, cb) |
|
|
|
this._popupId = currentPopup.id |
|
|
|
creation && creation.then && creation.then(cb) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|