From 9816596cf8942406bf7ae3e66dfdda3c31464da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=AD=90=E7=9D=BF?= <1342954478@qq.com> Date: Fri, 2 Jun 2023 21:34:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20'app/static/js/tanyanmei-f?= =?UTF-8?q?illword.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/static/js/tanyanmei-fillword.js | 33 ----------------------------- 1 file changed, 33 deletions(-) delete mode 100644 app/static/js/tanyanmei-fillword.js diff --git a/app/static/js/tanyanmei-fillword.js b/app/static/js/tanyanmei-fillword.js deleted file mode 100644 index 49a8bc2..0000000 --- a/app/static/js/tanyanmei-fillword.js +++ /dev/null @@ -1,33 +0,0 @@ -isRead = true; -isChoose = true; -var reader = window.speechSynthesis; // 全局定义朗读者,以便朗读和暂停 -reader.cancel();// 初始化时清空reader列表 -function getWord(){ - var word = window.getSelection?window.getSelection():document.selection.createRange().text; - return word; -} -function fillinWord(){ - var word = getWord(); - if (isRead) read(word); - if (!isChoose) return; - var element = document.getElementById("selected-words"); - element.value = element.value + " " + word; -} -document.getElementById("text-content").addEventListener("click", fillinWord, false); -function read(s){ - var msg = new SpeechSynthesisUtterance(s); - reader.speak(msg); - console.log("+++++++++++++"); -} - -function onReadClick(){ - isRead = !isRead; - if(!isRead){ - reader.cancel(); - } -} -function onChooseClick(){ - isChoose = !isChoose; -} - -∑∑