| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 node.classList.add('inactive-extension'); | 90 node.classList.add('inactive-extension'); |
| 91 | 91 |
| 92 if (!extension.userModifiable) | 92 if (!extension.userModifiable) |
| 93 node.classList.add('may-not-disable'); | 93 node.classList.add('may-not-disable'); |
| 94 | 94 |
| 95 var idToHighlight = this.getIdQueryParam_(); | 95 var idToHighlight = this.getIdQueryParam_(); |
| 96 if (node.id == idToHighlight) | 96 if (node.id == idToHighlight) |
| 97 node.classList.add('extension-highlight'); | 97 node.classList.add('extension-highlight'); |
| 98 | 98 |
| 99 var item = node.querySelector('.extension-list-item'); | 99 var item = node.querySelector('.extension-list-item'); |
| 100 item.style.backgroundImage = 'url(' + extension.icon + ')'; | 100 item.style.backgroundImage = 'url(' + extension.icon + '?' + |
| 101 extension.imageId + ')'; |
| 101 | 102 |
| 102 var title = node.querySelector('.extension-title'); | 103 var title = node.querySelector('.extension-title'); |
| 103 title.textContent = extension.name; | 104 title.textContent = extension.name; |
| 104 | 105 |
| 105 var version = node.querySelector('.extension-version'); | 106 var version = node.querySelector('.extension-version'); |
| 106 version.textContent = extension.version; | 107 version.textContent = extension.version; |
| 107 | 108 |
| 108 var locationText = node.querySelector('.location-text'); | 109 var locationText = node.querySelector('.location-text'); |
| 109 locationText.textContent = extension.locationText; | 110 locationText.textContent = extension.locationText; |
| 110 | 111 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 } | 315 } |
| 315 | 316 |
| 316 this.appendChild(node); | 317 this.appendChild(node); |
| 317 } | 318 } |
| 318 }; | 319 }; |
| 319 | 320 |
| 320 return { | 321 return { |
| 321 ExtensionsList: ExtensionsList | 322 ExtensionsList: ExtensionsList |
| 322 }; | 323 }; |
| 323 }); | 324 }); |
| OLD | NEW |