mirror of
https://gitee.com/bitdance-team/chrome-extension
synced 2025-01-10 13:48:14 +08:00
添加右键菜单
This commit is contained in:
parent
43c595380f
commit
6b0e0efcb3
@ -1 +1,11 @@
|
||||
console.log("[BitDance extension] 学生助手插件已启用")
|
||||
chrome.contextMenus.create({
|
||||
id: 'bitdance',
|
||||
title: '学生助手' //,
|
||||
// onclick: function () {
|
||||
// alert("[BitDance extension] 学生助手插件 - 已点击菜单")
|
||||
// }
|
||||
})
|
||||
|
||||
// chrome.contextMenus.onClicked.addListener(function (info) {
|
||||
// alert('当前菜单信息:'+ JSON.stringify(info))
|
||||
// })
|
1
packages/shell-chrome/assets/js/content.js
Normal file
1
packages/shell-chrome/assets/js/content.js
Normal file
@ -0,0 +1 @@
|
||||
console.log("[BitDance extension] 学生助手插件已启用")
|
@ -4,13 +4,18 @@
|
||||
"description": "BitDance Chrome Extension",
|
||||
"manifest_version": 2,
|
||||
"_locale": "zh_CN",
|
||||
"background": {
|
||||
"scripts": [
|
||||
"assets/js/background.js"
|
||||
]
|
||||
},
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": [
|
||||
"<all_urls>"
|
||||
],
|
||||
"js": [
|
||||
"assets/js/background.js"
|
||||
"assets/js/content.js"
|
||||
],
|
||||
"css": []
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user