| OLD | NEW |
| 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 AlertOverlay = options.AlertOverlay; | 6 var AlertOverlay = options.AlertOverlay; |
| 7 var AutofillEditAddressOverlay = options.AutofillEditAddressOverlay; | 7 var AutofillEditAddressOverlay = options.AutofillEditAddressOverlay; |
| 8 var AutofillEditCreditCardOverlay = options.AutofillEditCreditCardOverlay; | 8 var AutofillEditCreditCardOverlay = options.AutofillEditCreditCardOverlay; |
| 9 var AutofillOptions = options.AutofillOptions; | 9 var AutofillOptions = options.AutofillOptions; |
| 10 var AutomaticSettingsResetBanner = options.AutomaticSettingsResetBanner; | 10 var AutomaticSettingsResetBanner = options.AutomaticSettingsResetBanner; |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 AutomaticSettingsResetBanner.getInstance().initialize(); | 224 AutomaticSettingsResetBanner.getInstance().initialize(); |
| 225 OptionsPage.initialize(); | 225 OptionsPage.initialize(); |
| 226 | 226 |
| 227 var path = document.location.pathname; | 227 var path = document.location.pathname; |
| 228 | 228 |
| 229 if (path.length > 1) { | 229 if (path.length > 1) { |
| 230 // Skip starting slash and remove trailing slash (if any). | 230 // Skip starting slash and remove trailing slash (if any). |
| 231 var pageName = path.slice(1).replace(/\/$/, ''); | 231 var pageName = path.slice(1).replace(/\/$/, ''); |
| 232 OptionsPage.showPageByName(pageName, true, {replaceState: true}); | 232 OptionsPage.showPageByName(pageName, true, {replaceState: true}); |
| 233 } else { | 233 } else { |
| 234 OptionsPage.showDefaultPage(); | 234 OptionsPage.showDefaultPage({replaceState: true}); |
| 235 } | 235 } |
| 236 | 236 |
| 237 var subpagesNavTabs = document.querySelectorAll('.subpages-nav-tabs'); | 237 var subpagesNavTabs = document.querySelectorAll('.subpages-nav-tabs'); |
| 238 for (var i = 0; i < subpagesNavTabs.length; i++) { | 238 for (var i = 0; i < subpagesNavTabs.length; i++) { |
| 239 subpagesNavTabs[i].onclick = function(event) { | 239 subpagesNavTabs[i].onclick = function(event) { |
| 240 OptionsPage.showTab(event.srcElement); | 240 OptionsPage.showTab(event.srcElement); |
| 241 }; | 241 }; |
| 242 } | 242 } |
| 243 | 243 |
| 244 window.setTimeout(function() { | 244 window.setTimeout(function() { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 257 options.OptionsPage.willClose(); | 257 options.OptionsPage.willClose(); |
| 258 }; | 258 }; |
| 259 | 259 |
| 260 /** | 260 /** |
| 261 * Listener for the |popstate| event. | 261 * Listener for the |popstate| event. |
| 262 * @param {Event} e The |popstate| event. | 262 * @param {Event} e The |popstate| event. |
| 263 */ | 263 */ |
| 264 window.onpopstate = function(e) { | 264 window.onpopstate = function(e) { |
| 265 options.OptionsPage.setState(e.state); | 265 options.OptionsPage.setState(e.state); |
| 266 }; | 266 }; |
| OLD | NEW |