aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/scripts/lib/notifications.js4
-rw-r--r--app/scripts/popup.js10
2 files changed, 12 insertions, 2 deletions
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 = `
<svg xmlns="http://www.w3.org/2000/svg" width="450" height="300">
<foreignObject x="0" y="0" width="100%" height="100%">
<body xmlns="http://www.w3.org/1999/xhtml" height="100%">{{content}}</body>
@@ -188,4 +188,4 @@ function svgWrapper(content){
function toSvgUri(content){
return 'data:image/svg+xml;utf8,' + encodeURIComponent(content)
-} \ No newline at end of file
+}
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')