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

Side by Side Diff: lib/stats.js

Issue 6445129351036928: Noissue - Fixed issue where JsDoc documented module functions incorrectly (Closed)
Patch Set: Fixed syntax error Created April 18, 2015, 2:54 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/icon.js ('k') | lib/url.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2015 Eyeo GmbH 3 * Copyright (C) 2006-2015 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 12 matching lines...) Expand all
23 23
24 let badgeColor = "#646464"; 24 let badgeColor = "#646464";
25 let statsPerPage = new ext.PageMap(); 25 let statsPerPage = new ext.PageMap();
26 26
27 /** 27 /**
28 * Get statistics for specified page 28 * Get statistics for specified page
29 * @param {String} key field key 29 * @param {String} key field key
30 * @param {Page} page field page 30 * @param {Page} page field page
31 * @return {Number} field value 31 * @return {Number} field value
32 */ 32 */
33 let getStats = exports.getStats = function getStats(key, page) 33 exports.getStats = function(key, page)
34 { 34 {
35 if (!page) 35 if (!page)
36 return (key in Prefs.stats_total ? Prefs.stats_total[key] : 0); 36 return (key in Prefs.stats_total ? Prefs.stats_total[key] : 0);
37 37
38 let pageStats = statsPerPage.get(page); 38 let pageStats = statsPerPage.get(page);
39 return pageStats ? pageStats.blocked : 0; 39 return pageStats ? pageStats.blocked : 0;
40 }; 40 };
41 41
42 FilterNotifier.addListener(function(action, item, newValue, oldValue, page) 42 FilterNotifier.addListener(function(action, item, newValue, oldValue, page)
43 { 43 {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 color: badgeColor, 98 color: badgeColor,
99 number: pageStats.blocked 99 number: pageStats.blocked
100 }; 100 };
101 } 101 }
102 } 102 }
103 103
104 page.browserAction.setBadge(badge); 104 page.browserAction.setBadge(badge);
105 } 105 }
106 }); 106 });
107 }); 107 });
OLDNEW
« no previous file with comments | « lib/icon.js ('k') | lib/url.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld