aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js')
-rw-r--r--ext/fg/js/api.js4
-rw-r--r--ext/fg/js/client.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/ext/fg/js/api.js b/ext/fg/js/api.js
index 9026c8d3..e13c1421 100644
--- a/ext/fg/js/api.js
+++ b/ext/fg/js/api.js
@@ -45,6 +45,6 @@ function bgGetState(callback) {
bgSendMessage('getState', null, callback);
}
-function bgCanAddNotes(definitions, callback) {
- bgSendMessage('canAddNotes', definitions, callback);
+function bgCanAddNotes(definitions, modes, callback) {
+ bgSendMessage('canAddNotes', {definitions, modes}, callback);
}
diff --git a/ext/fg/js/client.js b/ext/fg/js/client.js
index b4c1c2d4..4b34ef9a 100644
--- a/ext/fg/js/client.js
+++ b/ext/fg/js/client.js
@@ -115,7 +115,7 @@ class Client {
this.definitions = definitions;
this.showPopup(range, content);
- bgCanAddNotes(definitions, (states) => {
+ bgCanAddNotes(definitions, ['vocabExp', 'vocabReading'], (states) => {
if (states !== null) {
states.forEach((state, index) => this.popup.sendMessage(
'setActionState',
@@ -149,7 +149,7 @@ class Client {
this.definitions = definitions;
this.popup.setContent(content, definitions);
- bgCanAddNotes(definitions, (states) => {
+ bgCanAddNotes(definitions, ['kanji'], (states) => {
if (states !== null) {
states.forEach((state, index) => this.popup.sendMessage(
'setActionState',