aboutsummaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-05-07 13:43:32 -0700
committerAlex Yatskov <alex@foosoft.net>2016-05-07 13:43:32 -0700
commit9b9985bd4ba810d5a4e985100c68c544df9bccaf (patch)
tree7d5ac749aa12a1a113a74731b33d81cbd960d91c /ext/fg
parent8c1ebe6bcbc3511231c60133cd54722ae97e43ee (diff)
Improvements
Diffstat (limited to 'ext/fg')
-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',