新增百度汉语搜索和必应辞典搜索

pull/375/head
jingjingxyk 3 years ago
parent 9f9c45111e
commit 0ff82191e6

@ -14,3 +14,10 @@
1. [content_scripts](https:////developer.chrome.com/docs/extensions/mv3/content_scripts/)
1. [Declare permissions](https:////developer.chrome.com/docs/extensions/mv3/declare_permissions/)
1. [ReplaceGoogleCDN](https://github.com/justjavac/ReplaceGoogleCDN.git)
## note
```text
https://dict.youdao.com/dictvoice?audio=parameter&type=1
```

@ -5,6 +5,8 @@ import * as searchEngine from "./search-engine.js";
let goToSearchPronounce = (word) => {
let search_engine_name = "gotToGoogleSearch";
// search_engine_name='gotToYouDaoSearch'
search_engine_name = "goToBingDictSearch";
search_engine_name = "gotToYouDaoSearch";
let tab = "current_tab";
let opener = components.getSearchEngineOpener();

@ -8,6 +8,13 @@ let gotToYouDaoSearch = (word) => {
return `https://www.youdao.com/result?word=${word}&lang=en`;
};
let goToBingDictSearch = (word) => {
return `https://cn.bing.com/dict/search?q=${word}`;
};
let goToBaiduDictSearch = (word) => {
return ` https://dict.baidu.com/s?wd=${word}`;
};
let goToBaiDuHanYu = () => {
// 一点飞上天,黄河两头弯;八字大张口,言字中间走;左一扭,右一扭,你一长,我一长,中间加个马大王;心字底,月字旁,一个小勾挂麻糖,坐个车子逛咸阳。
// 56个笔画的字 邉
@ -19,4 +26,10 @@ let goToBaiDuHanYu = () => {
//https://hanyu.baidu.com/s?wd=%E9%82%89
};
export { goToBaiDuHanYu, gotToYouDaoSearch, gotToGoogleSearch };
export {
goToBaiDuHanYu,
gotToYouDaoSearch,
gotToGoogleSearch,
goToBingDictSearch,
goToBaiduDictSearch,
};

@ -17,7 +17,15 @@
"declarativeNetRequest",
"declarativeNetRequestWithHostAccess"
],
"host_permissions": ["*://github.com/*", "*://www.google.com/*"],
"host_permissions": [
"*://github.com/*",
"*://www.google.com/*",
"*://cn.bing.com/*",
"*://www.bing.com/*",
"*://dict.baidu.com/*",
"*://www.youdao.com/*",
"*://dict.youdao.com/*"
],
"web_accessible_resources": [
{
"resources": ["*.js", "*.css", "*.html"],

@ -41,7 +41,9 @@
"requestDomains": [
"github.com",
"githubusercontent.com",
"www.google.com"
"www.google.com",
"cn.bing.com",
"www.bing.com"
],
"resourceTypes": [
"main_frame",

Loading…
Cancel
Save