summaryrefslogtreecommitdiff
path: root/ext/fg/js/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/client.js')
-rw-r--r--ext/fg/js/client.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/fg/js/client.js b/ext/fg/js/client.js
index 1f77ed95..10e8a0ae 100644
--- a/ext/fg/js/client.js
+++ b/ext/fg/js/client.js
@@ -168,9 +168,13 @@ class Client {
});
}
- api_pronounce(index) {
- const dfn = this.definitions[index];
- const url = `http://assets.languagepod101.com/dictionary/japanese/audiomp3.php?kana=${dfn.reading}&kanji=${dfn.expression}`;
+ api_playAudio(index) {
+ const definition = this.definitions[index];
+
+ let url = `https://assets.languagepod101.com/dictionary/japanese/audiomp3.php?kanji=${definition.expression}`;
+ if (definition.reading) {
+ url += `&kana=${definition.reading}`;
+ }
for (let key in this.audio) {
this.audio[key].pause();