| 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 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * A lookup helper function to find the first node that has an id (starting | 9 * A lookup helper function to find the first node that has an id (starting |
| 10 * at |node| and going up the parent chain). | 10 * at |node| and going up the parent chain). |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 var item = node.querySelector('.extension-list-item'); | 77 var item = node.querySelector('.extension-list-item'); |
| 78 item.style.backgroundImage = 'url(' + extension.icon + ')'; | 78 item.style.backgroundImage = 'url(' + extension.icon + ')'; |
| 79 | 79 |
| 80 var title = node.querySelector('.extension-title'); | 80 var title = node.querySelector('.extension-title'); |
| 81 title.textContent = extension.name; | 81 title.textContent = extension.name; |
| 82 | 82 |
| 83 var version = node.querySelector('.extension-version'); | 83 var version = node.querySelector('.extension-version'); |
| 84 version.textContent = extension.version; | 84 version.textContent = extension.version; |
| 85 | 85 |
| 86 var disableReason = node.querySelector('.extension-disable-reason'); |
| 87 disableReason.textContent = extension.disableReason; |
| 88 |
| 89 var locationText = node.querySelector('.location-text'); |
| 90 locationText.textContent = extension.locationText; |
| 91 |
| 86 var description = node.querySelector('.extension-description span'); | 92 var description = node.querySelector('.extension-description span'); |
| 87 description.textContent = extension.description; | 93 description.textContent = extension.description; |
| 88 | 94 |
| 89 // The 'Show Browser Action' button. | 95 // The 'Show Browser Action' button. |
| 90 if (extension.enable_show_button) { | 96 if (extension.enable_show_button) { |
| 91 var showButton = node.querySelector('.show-button'); | 97 var showButton = node.querySelector('.show-button'); |
| 92 showButton.addEventListener('click', function(e) { | 98 showButton.addEventListener('click', function(e) { |
| 93 chrome.send('extensionSettingsShowButton', [extension.id]); | 99 chrome.send('extensionSettingsShowButton', [extension.id]); |
| 94 }); | 100 }); |
| 95 showButton.hidden = false; | 101 showButton.hidden = false; |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 } | 273 } |
| 268 | 274 |
| 269 this.appendChild(node); | 275 this.appendChild(node); |
| 270 } | 276 } |
| 271 }; | 277 }; |
| 272 | 278 |
| 273 return { | 279 return { |
| 274 ExtensionsList: ExtensionsList | 280 ExtensionsList: ExtensionsList |
| 275 }; | 281 }; |
| 276 }); | 282 }); |
| OLD | NEW |