aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/frame.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/frame.js')
-rw-r--r--ext/fg/js/frame.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/fg/js/frame.js b/ext/fg/js/frame.js
index 9c4b9318..165a9795 100644
--- a/ext/fg/js/frame.js
+++ b/ext/fg/js/frame.js
@@ -36,12 +36,12 @@ function registerAddNoteLinks() {
}
}
-function registerPronounceLinks() {
- for (let link of [].slice.call(document.getElementsByClassName('action-pronounce'))) {
+function registerAudioLinks() {
+ for (let link of [].slice.call(document.getElementsByClassName('action-play-audio'))) {
link.addEventListener('click', (e) => {
e.preventDefault();
const ds = e.currentTarget.dataset;
- window.parent.postMessage({action: 'pronounce', params: ds.index}, '*');
+ window.parent.postMessage({action: 'playAudio', params: ds.index}, '*');
});
}
}
@@ -49,7 +49,7 @@ function registerPronounceLinks() {
function onDomContentLoaded() {
registerKanjiLinks();
registerAddNoteLinks();
- registerPronounceLinks();
+ registerAudioLinks();
}
function onMessage(e) {