aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/yomichan.js
diff options
context:
space:
mode:
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();