summaryrefslogtreecommitdiff
path: root/ext/fg/js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-06-14 09:05:40 -0700
committerAlex Yatskov <alex@foosoft.net>2016-06-14 20:44:38 -0700
commitcaf067883275f9b46259c2dbbf1f36aafc7e9108 (patch)
tree4fda64b2d9448fd082e64a6440a2449fc27d38c4 /ext/fg/js
parent15f2744f04ae59ba78700f65a8512aacde859f82 (diff)
Cleanup
Diffstat (limited to 'ext/fg/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 376d4826..339958f2 100644
--- a/ext/fg/js/frame.js
+++ b/ext/fg/js/frame.js
@@ -26,8 +26,8 @@ function registerKanjiLinks() {
}
}
-function registerLearnLinks() {
- for (const link of [].slice.call(document.getElementsByClassName('action-learn'))) {
+function registerAddNoteLinks() {
+ for (const link of [].slice.call(document.getElementsByClassName('action-add-note'))) {
link.addEventListener('click', (e) => {
e.preventDefault();
const ds = e.currentTarget.dataset;
@@ -48,7 +48,7 @@ function registerPronounceLinks() {
function onDomContentLoaded() {
registerKanjiLinks();
- registerLearnLinks();
+ registerAddNoteLinks();
registerPronounceLinks();
}
@@ -61,7 +61,7 @@ function onMessage(e) {
function api_setActionState({index, state, sequence}) {
for (const mode in state) {
- const matches = document.querySelectorAll(`.action-learn[data-sequence="${sequence}"][data-index="${index}"][data-mode="${mode}"]`);
+ const matches = document.querySelectorAll(`.action-bar[data-sequence="${sequence}"] .action-add-note[data-index="${index}"][data-mode="${mode}"]`);
if (matches.length === 0) {
return;
}