dev......

This commit is contained in:
Gabe Yuan
2023-08-31 00:18:57 +08:00
parent c46fe7d1c6
commit aa795e2731
21 changed files with 228 additions and 449 deletions

View File

@@ -13,21 +13,3 @@ function _browser() {
}
export const browser = _browser();
// export const client = process.env.REACT_APP_CLIENT;
// export const isExt = CLIENT_EXTS.includes(client);
// export const isGm = client === CLIENT_USERSCRIPT;
// export const isWeb = client === CLIENT_WEB;
/**
* 本地语言识别
* @param {*} q
* @returns
*/
export const detectLang = async (q) => {
try {
const res = await browser?.i18n?.detectLanguage(q);
return res?.languages?.[0]?.language;
} catch (err) {
console.log("[detect lang]", err);
}
};