Skip to content

Commit 99e6704

Browse files
committed
百度快捷搜索第一版
0 parents  commit 99e6704

File tree

4 files changed

+33
-0
lines changed

4 files changed

+33
-0
lines changed

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"formatOnSave": true,
5+
"printWidth": 1000
6+
}

images/icon.png

765 Bytes
Loading

js/background.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
chrome.contextMenus.create({
2+
type: 'normal',
3+
title: '百度一下',
4+
contexts: ['selection'],
5+
onclick: (info) => {
6+
window.open('https://www.baidu.com/s?wd=' + info.selectionText)
7+
},
8+
})

manifest.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"manifest_version": 2,
3+
"name": "百度一下",
4+
"description": "百度一下,百度快捷搜索",
5+
"version": "1.0.0",
6+
"icons": {
7+
"16": "images/icon.png",
8+
"48": "images/icon.png",
9+
"128": "images/icon.png"
10+
},
11+
"background": {
12+
"scripts": [
13+
"js/background.js"
14+
]
15+
},
16+
"permissions": [
17+
"contextMenus"
18+
]
19+
}

0 commit comments

Comments
 (0)