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

Delta Between Two Patch Sets: lib/prefs.js

Issue 6648246944399360: Noissue - Document the prefs module (Closed)
Left Patch Set: Created April 15, 2015, 4 p.m.
Right Patch Set: Added link to devbuild announcement explaining the suppress_first_run_page preference Created April 18, 2015, 2:35 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 let defaults = Object.create(null); 23 let defaults = Object.create(null);
24 let overrides = Object.create(null); 24 let overrides = Object.create(null);
25 25
26 /** 26 /**
27 * Only for compatibility with core code. Please do not change! 27 * Only for compatibility with core code. Please do not change!
28 * 28 *
29 * @type {boolean} 29 * @type {boolean}
30 */ 30 */
31 defaults.enabled = true; 31 defaults.enabled = true;
32 /** 32 /**
33 * The application version as set during intilization. Used to detect updates. 33 * The application version as set during initialization. Used to detect updates.
kzar 2015/04/16 12:11:14 Nit: initialization
kzar 2015/04/16 13:32:34 What about these comments?
Sebastian Noack 2015/04/16 13:47:06 I didn't addressed them yet, or do you read "Done"
kzar 2015/04/16 13:48:55 You quite commonly say "What about this comment" o
Sebastian Noack 2015/04/16 13:51:43 Done.
Sebastian Noack 2015/04/16 13:51:43 Only if you uploaded a new patch set, and I have r
kzar 2015/04/16 13:54:50 You had uploaded a new patch set though...
Sebastian Noack 2015/04/16 13:57:02 ... before you published your comments. ;)
34 * 34 *
35 * @type {string} 35 * @type {string}
36 */ 36 */
37 defaults.currentVersion = ""; 37 defaults.currentVersion = "";
38 /** 38 /**
39 * Only for compatibility with core code. Please do not change! 39 * Only for compatibility with core code. Please do not change!
kzar 2015/04/16 12:11:14 It would be nice to add a little detail for all th
Sebastian Noack 2015/04/16 12:52:00 Those are already documented under https://adblock
kzar 2015/04/16 13:32:34 Fair enough but in that case how about adding a "@
Sebastian Noack 2015/04/16 13:47:06 I do for preferences that have an effect here. But
40 * 40 *
41 * @type {string} 41 * @type {string}
42 */ 42 */
43 defaults.data_directory = ""; 43 defaults.data_directory = "";
44 /** 44 /**
45 * @see https://adblockplus.org/en/preferences#patternsbackups 45 * @see https://adblockplus.org/en/preferences#patternsbackups
46 * @type {number} 46 * @type {number}
47 */ 47 */
48 defaults.patternsbackups = 5; 48 defaults.patternsbackups = 5;
49 /** 49 /**
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 * @type {boolean} 128 * @type {boolean}
129 */ 129 */
130 defaults.shouldShowBlockElementMenu = true; 130 defaults.shouldShowBlockElementMenu = true;
131 /** 131 /**
132 * Whether to collapse placeholders for blocked elements. 132 * Whether to collapse placeholders for blocked elements.
133 * 133 *
134 * @type {boolean} 134 * @type {boolean}
135 */ 135 */
136 defaults.hidePlaceholders = true; 136 defaults.hidePlaceholders = true;
137 /** 137 /**
138 * Whether to show the first run page. This preference isn't 138 * Whether to suppress the first run page. This preference isn't
139 * set by the extension but can be pre-configured externally. 139 * set by the extension but can be pre-configured externally.
140 * 140 *
141 * @see https://adblockplus.org/development-builds/suppressing-the-first-run-pag e-on-chrome
Sebastian Noack 2015/04/18 14:36:27 Note that this page isn't up yet, but will be at t
141 * @type {boolean} 142 * @type {boolean}
142 */ 143 */
143 defaults.suppress_first_run_page = false; 144 defaults.suppress_first_run_page = false;
144 145
145 /** 146 /**
146 * @namespace 147 * @namespace
147 * @static 148 * @static
148 */ 149 */
149 let Prefs = exports.Prefs = { 150 let Prefs = exports.Prefs = {
150 /** 151 /**
151 * Fired when the value of a preference changes. 152 * Fired when the value of a preference changes.
152 * 153 *
153 * @event 154 * @event
154 * @property {string} pref The name of the preference that changed. 155 * @property {string} pref The name of the preference that changed.
155 */ 156 */
156 onChanged: new ext._EventTarget(), 157 onChanged: new ext._EventTarget(),
157 158
158 /** 159 /**
159 * Fired when all preferences have been loaded. You must wait for 160 * Fired when all preferences have been loaded. You must wait for
160 * this event before using preferences during extension intilization. 161 * this event before using preferences during extension initialization.
kzar 2015/04/16 12:11:14 Nit: initialization
Sebastian Noack 2015/04/16 13:51:43 Done.
161 * 162 *
162 * @event 163 * @event
163 */ 164 */
164 onLoaded: new ext._EventTarget() 165 onLoaded: new ext._EventTarget()
165 }; 166 };
166 167
167 function keyToPref(key) 168 function keyToPref(key)
168 { 169 {
169 if (key.indexOf(keyPrefix) != 0) 170 if (key.indexOf(keyPrefix) != 0)
170 return null; 171 return null;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 }); 291 });
291 } 292 }
292 else 293 else
293 { 294 {
294 managedLoaded = true; 295 managedLoaded = true;
295 checkLoaded(); 296 checkLoaded();
296 } 297 }
297 } 298 }
298 299
299 init(); 300 init();
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld