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

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: use list join 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 // Proxy page is now per network and only reachable from internet details. 225 // Proxy page is now per network and only reachable from internet details.
226 if (pageName != 'proxy') { 226 if (pageName != 'proxy') {
227 // Show page, but don't update history (there's already an entry for it). 227 // Show page, but don't update history (there's already an entry for it).
228 OptionsPage.showPageByName(pageName, false); 228 OptionsPage.showPageByName(pageName, false);
229 } 229 }
230 } else { 230 } else {
231 OptionsPage.showDefaultPage(); 231 OptionsPage.showDefaultPage();
232 } 232 }
233 233
234 var subpagesNavTabs = document.querySelectorAll('.subpages-nav-tabs'); 234 var subpagesNavTabs = document.querySelectorAll('.subpages-nav-tabs');
235 for(var i = 0; i < subpagesNavTabs.length; i++) { 235 for (var i = 0; i < subpagesNavTabs.length; i++) {
236 subpagesNavTabs[i].onclick = function(event) { 236 subpagesNavTabs[i].onclick = function(event) {
237 OptionsPage.showTab(event.srcElement); 237 OptionsPage.showTab(event.srcElement);
238 } 238 }
239 } 239 }
240 240
241 // Allow platform specific CSS rules. 241 // Allow platform specific CSS rules.
242 cr.enablePlatformSpecificCSSRules(); 242 cr.enablePlatformSpecificCSSRules();
243 243
244 if (navigator.plugins['Shockwave Flash']) 244 if (navigator.plugins['Shockwave Flash'])
245 document.documentElement.setAttribute('hasFlashPlugin', ''); 245 document.documentElement.setAttribute('hasFlashPlugin', '');
246 } 246 }
247 247
248 document.addEventListener('DOMContentLoaded', load); 248 document.addEventListener('DOMContentLoaded', load);
249 249
250 /**
251 * Listener for the |beforeunload| event.
252 */
250 window.onbeforeunload = function() { 253 window.onbeforeunload = function() {
251 options.OptionsPage.willClose(); 254 options.OptionsPage.willClose();
252 }; 255 };
253 256
257 /**
258 * Listener for the |popstate| event.
259 * @param {Event} e The |popstate| event.
260 */
254 window.onpopstate = function(e) { 261 window.onpopstate = function(e) {
255 options.OptionsPage.setState(e.state); 262 options.OptionsPage.setState(e.state);
256 }; 263 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698