OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 * @fileoverview | 6 * @fileoverview |
7 * Simple utility functions for Chromoting. | 7 * Simple utility functions for Chromoting. |
8 */ | 8 */ |
9 | 9 |
10 /** | 10 /** |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 */ | 44 */ |
45 function getUrlParameters() { | 45 function getUrlParameters() { |
46 var result = {}; | 46 var result = {}; |
47 var parts = window.location.search.substring(1).split('&'); | 47 var parts = window.location.search.substring(1).split('&'); |
48 for (var i = 0; i < parts.length; i++) { | 48 for (var i = 0; i < parts.length; i++) { |
49 var pair = parts[i].split('='); | 49 var pair = parts[i].split('='); |
50 result[pair[0]] = decodeURIComponent(pair[1]); | 50 result[pair[0]] = decodeURIComponent(pair[1]); |
51 } | 51 } |
52 return result; | 52 return result; |
53 } | 53 } |
| 54 |
| 55 // This function can be called from the Javascript console to show all the UI, |
| 56 // for example prior to auditing the CSS. It is not useful otherwise. |
| 57 function unhideAll() { |
| 58 var hidden = document.querySelectorAll('[hidden]'); |
| 59 for (var i in hidden) { |
| 60 hidden[i].hidden = false; |
| 61 } |
| 62 } |
OLD | NEW |