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 /** | 5 /** |
6 * HSTS is HTTPS Strict Transport Security: a way for sites to elect to always | 6 * HSTS is HTTPS Strict Transport Security: a way for sites to elect to always |
7 * use HTTPS. See http://dev.chromium.org/sts | 7 * use HTTPS. See http://dev.chromium.org/sts |
8 * | 8 * |
9 * This UI allows a user to query and update the browser's list of HSTS domains. | 9 * This UI allows a user to query and update the browser's list of HSTS domains. |
10 * It also allows users to query and update the browser's list of public key | 10 * It also allows users to query and update the browser's list of public key |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 onSubmitQuery_: function(event) { | 95 onSubmitQuery_: function(event) { |
96 g_browser.sendHSTSQuery(this.queryInput_.value); | 96 g_browser.sendHSTSQuery(this.queryInput_.value); |
97 event.preventDefault(); | 97 event.preventDefault(); |
98 }, | 98 }, |
99 | 99 |
100 onHSTSQueryResult: function(result) { | 100 onHSTSQueryResult: function(result) { |
101 if (result.error != undefined) { | 101 if (result.error != undefined) { |
102 this.queryOutputDiv_.innerHTML = ''; | 102 this.queryOutputDiv_.innerHTML = ''; |
103 var s = addNode(this.queryOutputDiv_, 'span'); | 103 var s = addNode(this.queryOutputDiv_, 'span'); |
104 s.textContent = result.error; | 104 s.textContent = result.error; |
105 s.style.color = 'red'; | 105 s.style.color = '#e00'; |
106 yellowFade(this.queryOutputDiv_); | 106 yellowFade(this.queryOutputDiv_); |
107 return; | 107 return; |
108 } | 108 } |
109 | 109 |
110 if (result.result == false) { | 110 if (result.result == false) { |
111 this.queryOutputDiv_.innerHTML = '<b>Not found</b>'; | 111 this.queryOutputDiv_.innerHTML = '<b>Not found</b>'; |
112 yellowFade(this.queryOutputDiv_); | 112 yellowFade(this.queryOutputDiv_); |
113 return; | 113 return; |
114 } | 114 } |
115 | 115 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 element.style.webkitTransitionDuration = '0'; | 185 element.style.webkitTransitionDuration = '0'; |
186 element.style.backgroundColor = '#fffccf'; | 186 element.style.backgroundColor = '#fffccf'; |
187 setTimeout(function() { | 187 setTimeout(function() { |
188 element.style.webkitTransitionDuration = '1000ms'; | 188 element.style.webkitTransitionDuration = '1000ms'; |
189 element.style.backgroundColor = '#fff'; | 189 element.style.backgroundColor = '#fff'; |
190 }, 0); | 190 }, 0); |
191 } | 191 } |
192 | 192 |
193 return HSTSView; | 193 return HSTSView; |
194 })(); | 194 })(); |
OLD | NEW |