From 2ccc55da0f357e2da975e36a16b25c147708cd4b Mon Sep 17 00:00:00 2001 From: sienori Date: Sat, 2 Jun 2018 22:45:59 +0900 Subject: [PATCH] Prevent the display of buttons due to malfunction --- simple-translate/simple-translate.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simple-translate/simple-translate.js b/simple-translate/simple-translate.js index 04a06f5..441dfa5 100644 --- a/simple-translate/simple-translate.js +++ b/simple-translate/simple-translate.js @@ -38,10 +38,12 @@ async function Select(e) { clickPosition = e; switch (S.get().whenSelectText) { case 'showButton': + if(selectionWord.length==0) return; popupButton(e); break; case 'showPanel': translate(selectionWord, 'auto', S.get().targetLang); + if(selectionWord.length==0) return; showPanel(e); break; case 'dontShowButton':