Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 快捷键Chrome extension不';t工作_Javascript_Google Chrome_Google Chrome Extension - Fatal编程技术网

Javascript 快捷键Chrome extension不';t工作

Javascript 快捷键Chrome extension不';t工作,javascript,google-chrome,google-chrome-extension,Javascript,Google Chrome,Google Chrome Extension,当我尝试为我的新扩展Chrome添加一些快捷键时,它不起作用。当我尝试使用此行检查命令时: chrome.commands.getAll(command => { alert(JSON.stringify(command)) }) 说明和名称显示正确,但快捷方式属性呈现空字符串。我尝试了很多快捷方式,删除并重新安装我的未打包的扩展。在那之后,它总是不起作用 My manifest.json: { “清单版本”:2, “名称”:“myfirstext”, “版本”:“1.0.0”, “描

当我尝试为我的新扩展Chrome添加一些快捷键时,它不起作用。当我尝试使用此行检查命令时:

chrome.commands.getAll(command => { alert(JSON.stringify(command)) })
说明和名称显示正确,但快捷方式属性呈现空字符串。我尝试了很多快捷方式,删除并重新安装我的未打包的扩展。在那之后,它总是不起作用

My manifest.json:

{
“清单版本”:2,
“名称”:“myfirstext”,
“版本”:“1.0.0”,
“描述”:“布拉布拉”,
“作者”:{
“名称”:“Ben Lmsc”,
“url”:”https://github.com"
},
“背景”:{
“脚本”:[“js/main.js”]
},
“浏览器操作”:{
“默认弹出窗口”:“index.html”
},
“命令”:{
“处理我的钥匙”:{
“建议的_键”:{
“默认值”:“Ctrl+Shift+L”
},
“说明”:“我的快捷方式说明”
}
},
“图标”:{
“16”:“img/LOGO_16.png”,
“32”:“img/LOGO_32.png”,
“48”:“img/LOGO_48.png”,
“128”:“img/LOGO_128.png”
},
“权限”:[
“http://*/*”,
“https://*/*”,
“通知”
]

}
在中分配热键会发生什么情况chrome://extensions/shortcuts 对话框?您是在Mac还是Windows上执行此操作?中未分配任何内容chrome://extensions/shortcuts 对话我在mac上做这个。我试着在我的mac上删除Ctrl(或命令),效果很好。当我使用Ctrl+Shift+(Y,L,…)时,浏览器不运行