From 18e3ff0fedfe89f33c743d0d42dcb07a70076c4d Mon Sep 17 00:00:00 2001 From: fofolee Date: Sun, 5 Apr 2020 14:15:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=94=B6=E8=97=8F=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=9B=B4=E6=94=B9=E5=88=92?= =?UTF-8?q?=E8=AF=8D=E6=90=9C=E7=B4=A2UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/assets/index.js b/assets/index.js index 677c997f..43930940 100644 --- a/assets/index.js +++ b/assets/index.js @@ -394,14 +394,15 @@ $(document).keydown(e => { }) } } + break; // 划词翻译 case 84: if ($('#mainlist').is(':hidden') && $("#manual").is(":visible")) { let text = window.getSelection().toString(); if (text) { - if (/[\u4e00-\u9fa5]/.test(text)){ - utools.showNotification('中文你还看不懂嘛!', clickFeatureCode = null, silent = true) - } else { + // if (/[\u4e00-\u9fa5]/.test(text)){ + // utools.showNotification('中文你还看不懂嘛!', clickFeatureCode = null, silent = true) + // } else { let enText = encodeURIComponent(text) $("#infopannel").html('在线翻译中...').fadeIn(300); $.get("http://fanyi.youdao.com/translate?&doctype=json&type=EN2ZH_CN&i=" + enText, data => { @@ -417,8 +418,9 @@ $(document).keydown(e => { } $("#infopannel").html(cnText) }) - } + // } } } + break; } }); \ No newline at end of file