fix error and add new search engine

pull/375/head
jingjingxyk 2 years ago
parent 03e75b905c
commit 347137f597

@ -8,6 +8,7 @@ let goToSearchPronounce = (word) => {
// search_engine_name = "goToBingDictSearch"; // search_engine_name = "goToBingDictSearch";
// search_engine_name = "goToBingSearch"; // search_engine_name = "goToBingSearch";
search_engine_name = "gotToYouDaoSearch"; search_engine_name = "gotToYouDaoSearch";
// search_engine_name = "goToBaiduFanYiSearch";
let tab = "current_tab"; let tab = "current_tab";
let opener = components.getSearchEngineOpener(); let opener = components.getSearchEngineOpener();

@ -43,6 +43,8 @@ let getIframe = () => {
"id", "id",
"chinese-programmer-wrong-pronunciation-custom-iframe" "chinese-programmer-wrong-pronunciation-custom-iframe"
); );
iframe.setAttribute("security", "restricted");
//iframe.setAttribute('sandbox',"")
aside.appendChild(iframe); aside.appendChild(iframe);
custom_box.appendChild(aside); custom_box.appendChild(aside);
document.body.appendChild(custom_box); document.body.appendChild(custom_box);

@ -18,6 +18,10 @@ let goToBaiduDictSearch = (word) => {
return `https://dict.baidu.com/s?wd=${word}`; return `https://dict.baidu.com/s?wd=${word}`;
}; };
let goToBaiduFanYiSearch = (word) => {
return `https://fanyi.baidu.com/#en/zh/${word}`;
};
let goToBaiDuHanYu = () => { let goToBaiDuHanYu = () => {
// 一点飞上天,黄河两头弯;八字大张口,言字中间走;左一扭,右一扭,你一长,我一长,中间加个马大王;心字底,月字旁,一个小勾挂麻糖,坐个车子逛咸阳。 // 一点飞上天,黄河两头弯;八字大张口,言字中间走;左一扭,右一扭,你一长,我一长,中间加个马大王;心字底,月字旁,一个小勾挂麻糖,坐个车子逛咸阳。
// 56个笔画的字 邉 // 56个笔画的字 邉
@ -36,4 +40,5 @@ export {
goToBingDictSearch, goToBingDictSearch,
goToBingSearch, goToBingSearch,
goToBaiduDictSearch, goToBaiduDictSearch,
goToBaiduFanYiSearch,
}; };

@ -100,5 +100,5 @@ export {
getParameterValue, getParameterValue,
sleep, sleep,
getMediaDevices, getMediaDevices,
createJsonFile, createJSONFile,
}; };

@ -24,7 +24,8 @@
"*://www.bing.com/*", "*://www.bing.com/*",
"*://dict.baidu.com/*", "*://dict.baidu.com/*",
"*://www.youdao.com/*", "*://www.youdao.com/*",
"*://dict.youdao.com/*" "*://dict.youdao.com/*",
"*://fanyi.baidu.com/*"
], ],
"web_accessible_resources": [ "web_accessible_resources": [
{ {

@ -43,7 +43,12 @@
"githubusercontent.com", "githubusercontent.com",
"www.google.com", "www.google.com",
"cn.bing.com", "cn.bing.com",
"www.bing.com" "www.bing.com",
"fanyi.baidu.com",
"dict.baidu.com",
"www.youdao.com",
"dict.youdao.com",
"fanyi.baidu.com"
], ],
"resourceTypes": [ "resourceTypes": [
"main_frame", "main_frame",

Loading…
Cancel
Save