mirror of
https://github.com/mdn/webextensions-examples.git
synced 2026-05-05 07:07:46 +02:00
switch to using Ctrl+Shift+U in commands example
seems to be assigned to download manager (at least on linux)
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@ This extension includes:
|
|||||||
|
|
||||||
All it does is:
|
All it does is:
|
||||||
|
|
||||||
* register a shortcut (Ctrl+Shift+Y) to send a command to the extension (Command+Shift+Y on a Mac).",
|
* register a shortcut (Ctrl+Shift+U) to send a command to the extension (Command+Shift+U on a Mac).",
|
||||||
|
|
||||||
It shows:
|
It shows:
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
* [{
|
* [{
|
||||||
* name: "toggle-feature",
|
* name: "toggle-feature",
|
||||||
* description: "Send a 'toggle-feature' event to the extension"
|
* description: "Send a 'toggle-feature' event to the extension"
|
||||||
* shortcut: "Ctrl+Shift+Y"
|
* shortcut: "Ctrl+Shift+U"
|
||||||
* }]
|
* }]
|
||||||
*/
|
*/
|
||||||
chrome.commands.getAll(function(commandsArray) {
|
chrome.commands.getAll(function(commandsArray) {
|
||||||
@@ -19,8 +19,8 @@ chrome.commands.getAll(function(commandsArray) {
|
|||||||
/**
|
/**
|
||||||
* Fired when a registered command is activated using a keyboard shortcut.
|
* Fired when a registered command is activated using a keyboard shortcut.
|
||||||
*
|
*
|
||||||
* In this sample extension, there is only one registered command: "Ctrl+Shift+Y".
|
* In this sample extension, there is only one registered command: "Ctrl+Shift+U".
|
||||||
* On Mac, this command will automatically be converted to "Command+Shift+Y".
|
* On Mac, this command will automatically be converted to "Command+Shift+U".
|
||||||
*/
|
*/
|
||||||
chrome.commands.onCommand.addListener(function(command) {
|
chrome.commands.onCommand.addListener(function(command) {
|
||||||
console.log("onCommand event received for message: ", command);
|
console.log("onCommand event received for message: ", command);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Sample Commands Extension",
|
"name": "Sample Commands Extension",
|
||||||
"description": "Press Ctrl+Shift+Y to send an event (Command+Shift+Y on a Mac).",
|
"description": "Press Ctrl+Shift+U to send an event (Command+Shift+U on a Mac).",
|
||||||
"homepage_url": "https://github.com/mdn/webextensions-examples/tree/master/commands",
|
"homepage_url": "https://github.com/mdn/webextensions-examples/tree/master/commands",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
},
|
},
|
||||||
"commands": {
|
"commands": {
|
||||||
"toggle-feature": {
|
"toggle-feature": {
|
||||||
"suggested_key": { "default": "Ctrl+Shift+Y" },
|
"suggested_key": { "default": "Ctrl+Shift+U" },
|
||||||
"description": "Send a 'toggle-feature' event to the extension"
|
"description": "Send a 'toggle-feature' event to the extension"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user