Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: notification.js

Issue 29374674: Issue 4864 - Start using ESLint for adblockpluschrome (Closed)
Patch Set: Addressed more feedback Created March 31, 2017, 8:23 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/whitelisting.js ('k') | options.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: notification.js
diff --git a/notification.js b/notification.js
index ea6b43485e15322ecb72631d5a154de7646e0fc4..8e6d9ee9da4122c7bbf88ebc99aaa26cd27bad68 100644
--- a/notification.js
+++ b/notification.js
@@ -90,17 +90,16 @@ window.addEventListener("load", () =>
notificationElement.hidden = false;
notificationElement.addEventListener("click", event =>
{
- switch (event.target.id)
+ if (event.target.id == "notification-close")
+ notificationElement.classList.add("closing");
+ else if (event.target.id == "notification-optout" ||
+ event.target.id == "notification-hide")
{
- case "notification-close":
- notificationElement.classList.add("closing");
- break;
- case "notification-optout":
+ if (event.target.id == "notification-optout")
Notification.toggleIgnoreCategory("*", true);
- case "notification-hide":
- notificationElement.hidden = true;
- notification.onClicked();
- break;
+
+ notificationElement.hidden = true;
+ notification.onClicked();
}
}, true);
}, false);
« no previous file with comments | « lib/whitelisting.js ('k') | options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld