Chromium Code Reviews| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 options.hidden = false; | 130 options.hidden = false; |
| 131 } | 131 } |
| 132 | 132 |
| 133 if (extension.allow_activity) { | 133 if (extension.allow_activity) { |
| 134 var activity = node.querySelector('.activity-link'); | 134 var activity = node.querySelector('.activity-link'); |
| 135 activity.href = 'chrome://extension-activity?extensionId=' + | 135 activity.href = 'chrome://extension-activity?extensionId=' + |
| 136 extension.id; | 136 extension.id; |
| 137 activity.hidden = false; | 137 activity.hidden = false; |
| 138 } | 138 } |
| 139 | 139 |
| 140 // The 'View in Web Store' checkbox. | 140 // The 'View in Web Store' checkbox. |
|
Mihai Parparita -not on Chrome
2012/04/30 19:58:11
Nit: update comment (and perhaps even the link cla
Evan Stade
2012/04/30 23:15:38
Done.
| |
| 141 if (extension.homepageUrl) { | 141 if (extension.homepageUrl) { |
| 142 var store = node.querySelector('.store-link'); | 142 var store = node.querySelector('.store-link'); |
| 143 store.href = extension.homepageUrl; | 143 store.href = extension.homepageUrl; |
| 144 store.textContent = localStrings.getString(extension.homepageProvided ? | |
| 145 'extensionSettingsVisitWebsite' : 'extensionSettingsVisitWebStore'); | |
| 144 store.hidden = false; | 146 store.hidden = false; |
| 145 } | 147 } |
| 146 | 148 |
| 147 // The 'Reload' checkbox. | 149 // The 'Reload' checkbox. |
| 148 if (extension.allow_reload) { | 150 if (extension.allow_reload) { |
| 149 var reload = node.querySelector('.reload-link'); | 151 var reload = node.querySelector('.reload-link'); |
| 150 reload.addEventListener('click', function(e) { | 152 reload.addEventListener('click', function(e) { |
| 151 chrome.send('extensionSettingsReload', [extension.id]); | 153 chrome.send('extensionSettingsReload', [extension.id]); |
| 152 }); | 154 }); |
| 153 reload.hidden = false; | 155 reload.hidden = false; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 232 }); | 234 }); |
| 233 } | 235 } |
| 234 this.appendChild(node); | 236 this.appendChild(node); |
| 235 }, | 237 }, |
| 236 }; | 238 }; |
| 237 | 239 |
| 238 return { | 240 return { |
| 239 ExtensionsList: ExtensionsList | 241 ExtensionsList: ExtensionsList |
| 240 }; | 242 }; |
| 241 }); | 243 }); |
| OLD | NEW |