| 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 * @param {string} toTest The string to be tested. | 6 * @param {string} toTest The string to be tested. |
| 7 * @return {boolean} True if |toTest| contains only digits. Leading and trailing | 7 * @return {boolean} True if |toTest| contains only digits. Leading and trailing |
| 8 * whitespace is allowed. | 8 * whitespace is allowed. |
| 9 */ | 9 */ |
| 10 function isInteger(toTest) { | 10 function isInteger(toTest) { |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 } | 185 } |
| 186 return pageRanges; | 186 return pageRanges; |
| 187 } | 187 } |
| 188 | 188 |
| 189 /** | 189 /** |
| 190 * Shows or hides an element. | 190 * Shows or hides an element. |
| 191 * @param {Element} element Element to show or hide. | 191 * @param {Element} element Element to show or hide. |
| 192 * @param {boolean} isVisible Whether the element should be visible or not. | 192 * @param {boolean} isVisible Whether the element should be visible or not. |
| 193 */ | 193 */ |
| 194 function setIsVisible(element, isVisible) { | 194 function setIsVisible(element, isVisible) { |
| 195 element.style.display = isVisible ? '' : 'none'; | 195 element.hidden = !isVisible; |
| 196 } | 196 } |
| 197 | 197 |
| 198 /** | 198 /** |
| 199 * @param {Array.<object>} array Array to check for item. | 199 * @param {!Array} array Array to check for item. |
| 200 * @param {object} item Item to look for in array. | 200 * @param {*} item Item to look for in array. |
| 201 * @return {boolean} Whether the item is in the array. | 201 * @return {boolean} Whether the item is in the array. |
| 202 */ | 202 */ |
| 203 function arrayContains(array, item) { | 203 function arrayContains(array, item) { |
| 204 return array.indexOf(item) != -1; | 204 return array.indexOf(item) != -1; |
| 205 } | 205 } |
| OLD | NEW |