summaryrefslogtreecommitdiff
path: root/ext/bg/js/yomichan.js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-10-11 19:45:36 -0700
committerAlex Yatskov <alex@foosoft.net>2016-10-11 19:45:36 -0700
commit82162a071a518bef3a0bc85d00cbf2bbe5d37038 (patch)
treedec61bb9b05c8e5a9db69378c349631dc6e42e37 /ext/bg/js/yomichan.js
parenta949e66a6c244447e6e3b28b4a24954e68f0be5d (diff)
WIP
Diffstat (limited to 'ext/bg/js/yomichan.js')
-rw-r--r--ext/bg/js/yomichan.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js
index 25dbc23c..0038645c 100644
--- a/ext/bg/js/yomichan.js
+++ b/ext/bg/js/yomichan.js
@@ -103,10 +103,6 @@ class Yomichan {
this.tabInvokeAll('setOptions', this.options);
}
- getApiVersion() {
- return 1;
- }
-
tabInvokeAll(action, params) {
chrome.tabs.query({}, tabs => {
for (const tab of tabs) {
@@ -124,6 +120,7 @@ class Yomichan {
'audio',
'character',
'expression',
+ 'expression-furigana',
'glossary',
'glossary-list',
'kunyomi',
@@ -145,6 +142,13 @@ class Yomichan {
value = definition.reading;
}
break;
+ case 'expression-furigana':
+ if (mode === 'term_kana' && definition.reading) {
+ value = definition.reading;
+ } else {
+ value = `<ruby>${definition.expression}<rt>${definition.reading}</rt></ruby>`;
+ }
+ break;
case 'reading':
if (mode === 'term_kana') {
value = null;
@@ -274,10 +278,6 @@ class Yomichan {
api_getModelFieldNames({modelName, callback}) {
this.anki.getModelFieldNames(modelName).then(callback);
}
-
- api_getVersion({callback}) {
- this.anki.getVersion().then(callback);
- }
}
window.yomichan = new Yomichan();