From 6ee33522fae86dad66e4245ce6c6c69b5c1ba40b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=BD=E5=90=A7=EF=BC=8C=E4=BD=A0=E6=83=B3=E8=AF=B4?= =?UTF-8?q?=E5=95=A5?= Date: Wed, 4 Jan 2023 11:39:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3mac=E7=B3=BB=E7=BB=9Fchrome?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=99=A8=E4=B8=8A=EF=BC=8C=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E9=9F=B3=E9=A2=91=E5=9B=BE=E6=A0=87=E6=97=A0=E5=8F=8D=E5=BA=94?= =?UTF-8?q?=EF=BC=9B=E5=8D=95=E8=AF=8D=20ubuntu=20=E5=90=AF=E7=94=A8https?= =?UTF-8?q?=20(#407)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 解决mac chrome 点击音频图标无效 * 单词ubuntu 启用https --- README.md | 2 +- tools/chromium_extension/README.md | 5 +++++ tools/chromium_extension/js/app/init.js | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2d8c304..aa63ecb 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ | thymeleaf | [🔊](https://dict.youdao.com/dictvoice?audio=thymeleaf&type=1) /ˈtaɪmˌlɪːf/ | [🔊](https://dict.youdao.com/dictvoice?audio=thymeleaf&type=2) /ˈtaɪmˌlɪːf/ | ❌ /θiːmɪlɪːf/ | | tuple | [🔊](https://dict.youdao.com/dictvoice?audio=tuple&type=1) /tjʊpəl/ | [🔊](https://dict.youdao.com/dictvoice?audio=tuple&type=2) /tuːpəl/ | | | typical | [🔊](https://dict.youdao.com/dictvoice?audio=typical&type=1) /'tɪpɪkl/ | [🔊](https://dict.youdao.com/dictvoice?audio=typical&type=2) /ˈtɪpɪkl/ | ❌ /'taɪpɪkəl/ | -| Ubuntu | [🔊](http://upload.wikimedia.org/wikipedia/commons/b/b5/En-Ubuntu_pronunciation.oga) /ʊ'bʊntʊ/ | [🔊](http://upload.wikimedia.org/wikipedia/commons/b/b5/En-Ubuntu_pronunciation.oga) /ʊ'bʊntʊ/ | ❌ /juː'bʊntʊ/ | +| Ubuntu | [🔊](https://upload.wikimedia.org/wikipedia/commons/b/b5/En-Ubuntu_pronunciation.oga) /ʊ'bʊntʊ/ | [🔊](https://upload.wikimedia.org/wikipedia/commons/b/b5/En-Ubuntu_pronunciation.oga) /ʊ'bʊntʊ/ | ❌ /juː'bʊntʊ/ | | UEFI | U-E-F-I | U-E-F-I | ❌ /jufi/ /ɔːfi/ | | Vagrant | [🔊](https://dict.youdao.com/dictvoice?audio=Vagrant&type=1) /ˈveɪɡrənt/ | [🔊](https://dict.youdao.com/dictvoice?audio=Vagrant&type=2) /ˈveɪɡrənt/ | /ˈvagɹent/ | | variable | [🔊](https://dict.youdao.com/dictvoice?audio=variable&type=1) /'veəriəbl/ | [🔊](https://dict.youdao.com/dictvoice?audio=variable&type=2) /ˈveriəbl,ˈværiəbl/ | ❌ /və'raiəbl/ | diff --git a/tools/chromium_extension/README.md b/tools/chromium_extension/README.md index eb585be..c567cbc 100644 --- a/tools/chromium_extension/README.md +++ b/tools/chromium_extension/README.md @@ -1,5 +1,10 @@ # 无页面跳转收听正确读音 的 chromium 扩展 +## 使用说明 + +1. 点击第一列,调用的是搜索框页面 +1. 点击第二列和第三列,调用的播放音频功能 + ## [获得最新版扩展](https://github.com/jingjingxyk/chinese-programmer-wrong-pronunciation-chromium-extension.git) ## 手动安装扩展 diff --git a/tools/chromium_extension/js/app/init.js b/tools/chromium_extension/js/app/init.js index e5b36f8..0a2e61c 100644 --- a/tools/chromium_extension/js/app/init.js +++ b/tools/chromium_extension/js/app/init.js @@ -37,6 +37,10 @@ let init = () => { let aTag = event.target.parentNode.parentNode; audio_url = aTag.getAttribute("href"); } + if (event.target.nodeName === "G-EMOJI") { + let aTag = event.target.parentNode; + audio_url = aTag.getAttribute("href"); + } if (audio_url) { let desURL = new URL(audio_url); //console.log(desURL.protocol);