| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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/View Web Site' link. | 140 // The 'View in Web Store/View Web Site' link. |
| 141 if (extension.homepageUrl) { | 141 if (extension.homepageUrl) { |
| 142 var siteLink = node.querySelector('.site-link'); | 142 var siteLink = node.querySelector('.site-link'); |
| 143 siteLink.href = extension.homepageUrl; | 143 siteLink.href = extension.homepageUrl; |
| 144 siteLink.textContent = localStrings.getString( | 144 siteLink.textContent = loadTimeData.getString( |
| 145 extension.homepageProvided ? 'extensionSettingsVisitWebsite' : | 145 extension.homepageProvided ? 'extensionSettingsVisitWebsite' : |
| 146 'extensionSettingsVisitWebStore'); | 146 'extensionSettingsVisitWebStore'); |
| 147 siteLink.hidden = false; | 147 siteLink.hidden = false; |
| 148 } | 148 } |
| 149 | 149 |
| 150 // The 'Reload' checkbox. | 150 // The 'Reload' checkbox. |
| 151 if (extension.allow_reload) { | 151 if (extension.allow_reload) { |
| 152 var reload = node.querySelector('.reload-link'); | 152 var reload = node.querySelector('.reload-link'); |
| 153 reload.addEventListener('click', function(e) { | 153 reload.addEventListener('click', function(e) { |
| 154 chrome.send('extensionSettingsReload', [extension.id]); | 154 chrome.send('extensionSettingsReload', [extension.id]); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 } | 246 } |
| 247 | 247 |
| 248 this.appendChild(node); | 248 this.appendChild(node); |
| 249 }, | 249 }, |
| 250 }; | 250 }; |
| 251 | 251 |
| 252 return { | 252 return { |
| 253 ExtensionsList: ExtensionsList | 253 ExtensionsList: ExtensionsList |
| 254 }; | 254 }; |
| 255 }); | 255 }); |
| OLD | NEW |