aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/yomichan.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-07-01 18:27:49 -0700
committerAlex Yatskov <alex@foosoft.net>2017-07-01 18:27:49 -0700
commitd57c5530b7ad56a7cc89782b4d186d8fddb55d86 (patch)
tree09cce1fded053b04ea716c2d4d44fb4676b24800 /ext/bg/js/yomichan.js
parent390cb12896607144fcd1046950f3a2aa680db71b (diff)
view added notes
Diffstat (limited to 'ext/bg/js/yomichan.js')
-rw-r--r--ext/bg/js/yomichan.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js
index b4beb179..e0bdabc3 100644
--- a/ext/bg/js/yomichan.js
+++ b/ext/bg/js/yomichan.js
@@ -157,6 +157,10 @@ window.yomichan = new class {
});
}
+ noteView(noteId) {
+ return this.anki.guiBrowse(`nid:${noteId}`);
+ }
+
templateRender(template, data) {
return Promise.resolve(handlebarsRender(template, data));
}
@@ -211,6 +215,10 @@ window.yomichan = new class {
definitionsAddable: ({definitions, modes, callback}) => {
promiseCallback(this.definitionsAddable(definitions, modes), callback);
+ },
+
+ noteView: ({noteId}) => {
+ promiseCallback(this.noteView(noteId), callback);
}
};