Do not judge language when "dontShowButton" option is enabled
This commit is contained in:
parent
4fc51994cd
commit
44c1cb37f5
|
@ -38,8 +38,9 @@ async function Select(e) {
|
||||||
const shouldTranslate = existsSelectionWord && isLeftClick && isPanelOutside;
|
const shouldTranslate = existsSelectionWord && isLeftClick && isPanelOutside;
|
||||||
if (!shouldTranslate) return;
|
if (!shouldTranslate) return;
|
||||||
|
|
||||||
//選択した言語が翻訳先言語と異なれば翻訳する
|
//選択した言語が翻訳先言語と異なるか判定
|
||||||
if (S.get().ifCheckLang) {
|
const shouldShowButtons = S.get().whenSelectText != "dontShowButton";
|
||||||
|
if (S.get().ifCheckLang && shouldShowButtons) {
|
||||||
const shouldTranslate = await checkLang(selectionWord, "auto", S.get().targetLang);
|
const shouldTranslate = await checkLang(selectionWord, "auto", S.get().targetLang);
|
||||||
if (!shouldTranslate) return;
|
if (!shouldTranslate) return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue