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

Side by Side Diff: chrome/browser/resources/options2/options.js

Issue 9316086: Fix JavaScript errors in options2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new violations found after rebase Created 8 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 var AddLanguageOverlay = options.AddLanguageOverlay; 5 var AddLanguageOverlay = options.AddLanguageOverlay;
6 var AdvancedOptions = options.AdvancedOptions; 6 var AdvancedOptions = options.AdvancedOptions;
7 var AlertOverlay = options.AlertOverlay; 7 var AlertOverlay = options.AlertOverlay;
8 var AutofillEditAddressOverlay = options.AutofillEditAddressOverlay; 8 var AutofillEditAddressOverlay = options.AutofillEditAddressOverlay;
9 var AutofillEditCreditCardOverlay = options.AutofillEditCreditCardOverlay; 9 var AutofillEditCreditCardOverlay = options.AutofillEditCreditCardOverlay;
10 var AutofillOptions = options.AutofillOptions; 10 var AutofillOptions = options.AutofillOptions;
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // Proxy page is now per network and only reachable from internet details. 226 // Proxy page is now per network and only reachable from internet details.
227 if (pageName != 'proxy') { 227 if (pageName != 'proxy') {
228 // Show page, but don't update history (there's already an entry for it). 228 // Show page, but don't update history (there's already an entry for it).
229 OptionsPage.showPageByName(pageName, false); 229 OptionsPage.showPageByName(pageName, false);
230 } 230 }
231 } else { 231 } else {
232 OptionsPage.showDefaultPage(); 232 OptionsPage.showDefaultPage();
233 } 233 }
234 234
235 var subpagesNavTabs = document.querySelectorAll('.subpages-nav-tabs'); 235 var subpagesNavTabs = document.querySelectorAll('.subpages-nav-tabs');
236 for(var i = 0; i < subpagesNavTabs.length; i++) { 236 for (var i = 0; i < subpagesNavTabs.length; i++) {
237 subpagesNavTabs[i].onclick = function(event) { 237 subpagesNavTabs[i].onclick = function(event) {
238 OptionsPage.showTab(event.srcElement); 238 OptionsPage.showTab(event.srcElement);
239 } 239 }
240 } 240 }
241 241
242 // Allow platform specific CSS rules. 242 // Allow platform specific CSS rules.
243 cr.enablePlatformSpecificCSSRules(); 243 cr.enablePlatformSpecificCSSRules();
244 244
245 if (navigator.plugins['Shockwave Flash']) 245 if (navigator.plugins['Shockwave Flash'])
246 document.documentElement.setAttribute('hasFlashPlugin', ''); 246 document.documentElement.setAttribute('hasFlashPlugin', '');
247 } 247 }
248 248
249 document.addEventListener('DOMContentLoaded', load); 249 document.addEventListener('DOMContentLoaded', load);
250 250
251 /**
252 * Listener for the |beforeunload| event.
253 */
251 window.onbeforeunload = function() { 254 window.onbeforeunload = function() {
252 options.OptionsPage.willClose(); 255 options.OptionsPage.willClose();
253 }; 256 };
254 257
258 /**
259 * Listener for the |popstate| event.
260 * @param {Event} e The |popstate| event.
261 */
255 window.onpopstate = function(e) { 262 window.onpopstate = function(e) {
256 options.OptionsPage.setState(e.state); 263 options.OptionsPage.setState(e.state);
257 }; 264 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/options2/manage_profile_overlay.js ('k') | chrome/browser/resources/options2/options_page.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698