- if (command.scope_ui_visible) {
- var select = node.querySelector('.command-scope');
- select.id = this.createElementId_(
- 'setCommandScope', command.extension_id, command.command_name);
- select.hidden = false;
- // Add the 'In Chrome' option.
- var option = document.createElement('option');
- option.textContent = loadTimeData.getString('extensionCommandsRegular');
+ var select = node.querySelector('.command-scope');
+ select.id = this.createElementId_(
+ 'setCommandScope', command.extension_id, command.command_name);
+ select.hidden = false;
+ // Add the 'In Chrome' option.
+ var option = document.createElement('option');
+ option.textContent = loadTimeData.getString('extensionCommandsRegular');
+ select.appendChild(option);
+ if (command.extension_action) {
+ // Extension actions cannot be global, so we might as well disable the
+ // combo box, to signify that.
+ select.disabled = true;
+ } else {
+ // Add the 'Global' option.
+ option = document.createElement('option');
+ option.textContent = loadTimeData.getString('extensionCommandsGlobal');