| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 fileAccess.hidden = false; | 140 fileAccess.hidden = false; |
| 141 } | 141 } |
| 142 | 142 |
| 143 // The 'Options' checkbox. | 143 // The 'Options' checkbox. |
| 144 var options = node.querySelector('.options-link'); | 144 var options = node.querySelector('.options-link'); |
| 145 options.addEventListener('click', function(e) { | 145 options.addEventListener('click', function(e) { |
| 146 chrome.send('extensionSettingsOptions', [extension.id]); | 146 chrome.send('extensionSettingsOptions', [extension.id]); |
| 147 e.preventDefault(); | 147 e.preventDefault(); |
| 148 }); | 148 }); |
| 149 | 149 |
| 150 if (extension.allow_activity) { |
| 151 var activity = node.querySelector('.activity-link'); |
| 152 activity.href = 'chrome://extension-activity?extensionId=' + |
| 153 extension.id; |
| 154 activity.hidden = false; |
| 155 } |
| 156 |
| 150 // The 'View in Web Store' checkbox. | 157 // The 'View in Web Store' checkbox. |
| 151 if (extension.homepageUrl) { | 158 if (extension.homepageUrl) { |
| 152 var store = node.querySelector('.store-link'); | 159 var store = node.querySelector('.store-link'); |
| 153 store.href = extension.homepageUrl; | 160 store.href = extension.homepageUrl; |
| 154 store.hidden = false; | 161 store.hidden = false; |
| 155 } | 162 } |
| 156 | 163 |
| 157 // The 'Reload' checkbox. | 164 // The 'Reload' checkbox. |
| 158 if (extension.allow_reload) { | 165 if (extension.allow_reload) { |
| 159 var reload = node.querySelector('.reload-link'); | 166 var reload = node.querySelector('.reload-link'); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 } | 251 } |
| 245 | 252 |
| 246 this.appendChild(node); | 253 this.appendChild(node); |
| 247 }, | 254 }, |
| 248 }; | 255 }; |
| 249 | 256 |
| 250 return { | 257 return { |
| 251 ExtensionsList: ExtensionsList | 258 ExtensionsList: ExtensionsList |
| 252 }; | 259 }; |
| 253 }); | 260 }); |
| OLD | NEW |