From 4f4c5048bf386c7d8e93592644bcda99e0fc38ea Mon Sep 17 00:00:00 2001 From: Frankie Date: Tue, 28 Jun 2016 11:57:33 -0700 Subject: fix #341 close notifications when oppening pop up --- app/scripts/lib/notifications.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/scripts') diff --git a/app/scripts/lib/notifications.js b/app/scripts/lib/notifications.js index a5746ae6e..a31949108 100644 --- a/app/scripts/lib/notifications.js +++ b/app/scripts/lib/notifications.js @@ -176,7 +176,7 @@ function renderNotificationSVG(content, cb){ } function svgWrapper(content){ - var wrapperSource = ` + var wrapperSource = ` {{content}} @@ -188,4 +188,4 @@ function svgWrapper(content){ function toSvgUri(content){ return 'data:image/svg+xml;utf8,' + encodeURIComponent(content) -} \ No newline at end of file +} -- cgit From 16566ee7dbe00c40941b0ed3c7f3b96179cae3aa Mon Sep 17 00:00:00 2001 From: Frankie Date: Tue, 28 Jun 2016 12:57:06 -0700 Subject: Move clearNotifications to popup.js --- app/scripts/popup.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/scripts') diff --git a/app/scripts/popup.js b/app/scripts/popup.js index 5173507fa..5c5cf0455 100644 --- a/app/scripts/popup.js +++ b/app/scripts/popup.js @@ -65,11 +65,21 @@ function getCurrentDomain (cb) { }) } +function clearNotifications(){ + chrome.notifications.getAll(function (object) { + for (let notification in object){ + chrome.notifications.clear(notification) + } + }) +} + function setupApp (err, opts) { if (err) { alert(err.stack) throw err } + + clearNotifications() var container = document.getElementById('app-content') -- cgit