diff --git a/src/plugins/general/utils.js b/src/plugins/general/utils.js index ee39c28..9374d5b 100644 --- a/src/plugins/general/utils.js +++ b/src/plugins/general/utils.js @@ -569,6 +569,9 @@ function listenEventFromFloatingPanelEvent() { case "save-word": goThroughDomAndGenerateCustomElement(await getWordList()); break; + case "go-through-content": + goThroughDomAndGenerateCustomElement(await getWordList()); + break; default: break; } diff --git a/src/webPage/translationFloatingPanel/src/App.vue b/src/webPage/translationFloatingPanel/src/App.vue index 31ec118..bc035bb 100644 --- a/src/webPage/translationFloatingPanel/src/App.vue +++ b/src/webPage/translationFloatingPanel/src/App.vue @@ -136,6 +136,8 @@ function listenEventFromGeneralScript() { console.log('floating panel group id:', groupId.value); break; case 'search-word': + sendMessageToGeneralScript({ type: 'go-through-content' }); + dic.value = []; currentWord.value = data.word; if (data.word.trim().split(' ').length > 1) {