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

Unified Diff: lib/notification.js

Issue 29501607: Issue 5459 - Add support to show a notification based on the number of ads blocked (Closed)
Patch Set: Created July 31, 2017, 3:05 p.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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/notification.js
diff --git a/lib/notification.js b/lib/notification.js
index 311e4e881389424155f1a61a3c351a3f69cfaf88..39dfef4047a63ab4cd93023c6d426cd6d9a51a8f 100644
--- a/lib/notification.js
+++ b/lib/notification.js
@@ -304,6 +304,16 @@ let Notification = exports.Notification =
continue;
}
+ if (typeof notification.blocked_total_min == 'number' &&
+ (typeof Prefs.blocked_total != 'number' ||
wspee 2017/07/31 15:16:22 NOTE: Prefs.blocked_total only exists on webext ba
+ notification.blocked_total_min > Prefs.blocked_total))
+ continue
+
+ if (typeof notification.blocked_total_max == 'number' &&
+ (typeof Prefs.blocked_total != 'number' ||
+ notification.blocked_total_max < Prefs.blocked_total))
+ continue
+
if (!notificationToShow ||
getNumericalSeverity(notification) >
getNumericalSeverity(notificationToShow))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld