You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chinese-programmer-wrong-pr.../tools/chromium_extension/js/app/search-engine.js

36 lines
1.0 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

let gotToGoogleSearch = (word) => {
word = word.replace(/\s/, "+");
return `https://www.google.com/search?q=how+to+pronounce+${word}`;
};
let gotToYouDaoSearch = (word) => {
word = word.replace(/\s/, "+");
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个笔画的字 邉
// U+30EDE (简化版本 U+30EDD
{
"汉".charCodeAt(0).toString(16);
String.fromCharCode("0x6c49");
}
//https://hanyu.baidu.com/s?wd=%E9%82%89
};
export {
goToBaiDuHanYu,
gotToYouDaoSearch,
gotToGoogleSearch,
goToBingDictSearch,
goToBaiduDictSearch,
};