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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 var terminated_reload = node.querySelector('.terminated-reload-link'); | 193 var terminated_reload = node.querySelector('.terminated-reload-link'); |
194 terminated_reload.hidden = false; | 194 terminated_reload.hidden = false; |
195 terminated_reload.addEventListener('click', function(e) { | 195 terminated_reload.addEventListener('click', function(e) { |
196 chrome.send('extensionSettingsReload', [extension.id]); | 196 chrome.send('extensionSettingsReload', [extension.id]); |
197 }); | 197 }); |
198 } | 198 } |
199 | 199 |
200 // 'Remove' button. | 200 // 'Remove' button. |
201 var trashTemplate = $('template-collection').querySelector('.trash'); | 201 var trashTemplate = $('template-collection').querySelector('.trash'); |
202 var trash = trashTemplate.cloneNode(true); | 202 var trash = trashTemplate.cloneNode(true); |
| 203 trash.title = templateData.extensionUninstall; |
203 trash.addEventListener('click', function(e) { | 204 trash.addEventListener('click', function(e) { |
204 chrome.send('extensionSettingsUninstall', [extension.id]); | 205 chrome.send('extensionSettingsUninstall', [extension.id]); |
205 }); | 206 }); |
206 node.querySelector('.enable-controls').appendChild(trash); | 207 node.querySelector('.enable-controls').appendChild(trash); |
207 | 208 |
208 // Developer mode details. | 209 // Developer mode details. |
209 if (this.data_.developerMode) { | 210 if (this.data_.developerMode) { |
210 // First we have the id. | 211 // First we have the id. |
211 var idLabel = node.querySelector('.extension-id'); | 212 var idLabel = node.querySelector('.extension-id'); |
212 idLabel.textContent = ' ' + extension.id; | 213 idLabel.textContent = ' ' + extension.id; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 } | 255 } |
255 | 256 |
256 this.appendChild(node); | 257 this.appendChild(node); |
257 }, | 258 }, |
258 }; | 259 }; |
259 | 260 |
260 return { | 261 return { |
261 ExtensionsList: ExtensionsList | 262 ExtensionsList: ExtensionsList |
262 }; | 263 }; |
263 }); | 264 }); |
OLD | NEW |