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 = "goToBingSearch";
search_engine_name = "gotToYouDaoSearch";
// search_engine_name = "goToBaiduFanYiSearch";
let tab = "current_tab";
let opener = components.getSearchEngineOpener();

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

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

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

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

@ -43,7 +43,12 @@
"githubusercontent.com",
"www.google.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": [
"main_frame",

Loading…
Cancel
Save