Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: chrome/browser/resources/settings/settings_ui/settings_ui.js

Issue 2649663002: WebUI: Undo some usages of ES6 features that break uglify. (Closed)
Patch Set: Fix i->j Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-ui' implements the UI for the Settings page. 7 * 'settings-ui' implements the UI for the Settings page.
8 * 8 *
9 * Example: 9 * Example:
10 * 10 *
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // Trim leading whitespace only, to prevent searching for empty string. This 204 // Trim leading whitespace only, to prevent searching for empty string. This
205 // still allows the user to search for 'foo bar', while taking a long pause 205 // still allows the user to search for 'foo bar', while taking a long pause
206 // after typing 'foo '. 206 // after typing 'foo '.
207 var query = e.detail.replace(/^\s+/, ''); 207 var query = e.detail.replace(/^\s+/, '');
208 // Prevent duplicate history entries. 208 // Prevent duplicate history entries.
209 if (query == this.lastSearchQuery_) 209 if (query == this.lastSearchQuery_)
210 return; 210 return;
211 211
212 settings.navigateTo( 212 settings.navigateTo(
213 settings.Route.BASIC, 213 settings.Route.BASIC,
214 query.length > 0 ? new URLSearchParams(`search=${query}`) : undefined, 214 query.length > 0 ? new URLSearchParams('search=' + query) : undefined,
215 /* removeSearch */ true); 215 /* removeSearch */ true);
216 }, 216 },
217 217
218 /** 218 /**
219 * @param {Event} event 219 * @param {Event} event
220 * @private 220 * @private
221 */ 221 */
222 onIronActivate_: function(event) { 222 onIronActivate_: function(event) {
223 if (event.detail.item.id != 'advancedPage') 223 if (event.detail.item.id != 'advancedPage')
224 this.$.drawer.closeDrawer(); 224 this.$.drawer.closeDrawer();
225 }, 225 },
226 226
227 /** @private */ 227 /** @private */
228 onMenuButtonTap_: function() { 228 onMenuButtonTap_: function() {
229 this.$.drawer.toggle(); 229 this.$.drawer.toggle();
230 }, 230 },
231 231
232 /** @private */ 232 /** @private */
233 directionDelegateChanged_: function() { 233 directionDelegateChanged_: function() {
234 this.$.drawer.align = this.directionDelegate.isRtl() ? 234 this.$.drawer.align = this.directionDelegate.isRtl() ?
235 'right' : 'left'; 235 'right' : 'left';
236 }, 236 },
237 }); 237 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698