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

Side by Side Diff: chrome/browser/resources/options2/content_settings.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 cr.define('options', function() { 5 cr.define('options', function() {
6 const OptionsPage = options.OptionsPage; 6 const OptionsPage = options.OptionsPage;
7 7
8 ////////////////////////////////////////////////////////////////////////////// 8 //////////////////////////////////////////////////////////////////////////////
9 // ContentSettings class: 9 // ContentSettings class:
10 10
(...skipping 22 matching lines...) Expand all
33 for (var i = 0; i < exceptionsButtons.length; i++) { 33 for (var i = 0; i < exceptionsButtons.length; i++) {
34 exceptionsButtons[i].onclick = function(event) { 34 exceptionsButtons[i].onclick = function(event) {
35 var page = ContentSettingsExceptionsArea.getInstance(); 35 var page = ContentSettingsExceptionsArea.getInstance();
36 page.showList( 36 page.showList(
37 event.target.getAttribute('contentType')); 37 event.target.getAttribute('contentType'));
38 OptionsPage.navigateToPage('contentExceptions'); 38 OptionsPage.navigateToPage('contentExceptions');
39 // Add on the proper hash for the content type, and store that in the 39 // Add on the proper hash for the content type, and store that in the
40 // history so back/forward and tab restore works. 40 // history so back/forward and tab restore works.
41 var hash = event.target.getAttribute('contentType'); 41 var hash = event.target.getAttribute('contentType');
42 window.history.replaceState({pageName: page.name}, page.title, 42 window.history.replaceState({pageName: page.name}, page.title,
43 '/' + page.name + "#" + hash); 43 '/' + page.name + '#' + hash);
44 }; 44 };
45 } 45 }
46 46
47 var manageHandlersButton = $('manage-handlers-button'); 47 var manageHandlersButton = $('manage-handlers-button');
48 if (manageHandlersButton) { 48 if (manageHandlersButton) {
49 manageHandlersButton.onclick = function(event) { 49 manageHandlersButton.onclick = function(event) {
50 OptionsPage.navigateToPage('handlers'); 50 OptionsPage.navigateToPage('handlers');
51 }; 51 };
52 } 52 }
53 53
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 'list[mode=' + mode + ']'); 141 'list[mode=' + mode + ']');
142 exceptionsList.patternValidityCheckComplete(pattern, valid); 142 exceptionsList.patternValidityCheckComplete(pattern, valid);
143 }; 143 };
144 144
145 // Export 145 // Export
146 return { 146 return {
147 ContentSettings: ContentSettings 147 ContentSettings: ContentSettings
148 }; 148 };
149 149
150 }); 150 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698