aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-05-29 12:58:51 -0700
committerAlex Yatskov <alex@foosoft.net>2016-05-29 12:58:51 -0700
commit49951356572fe972ef01d0578861c39430520f19 (patch)
tree7262640e6ac77a99bd504bd1e0591f4f23333d6e /ext
parent8c944c62944e24459d69432851dd848c7aa95d87 (diff)
Cleanup
Diffstat (limited to 'ext')
-rw-r--r--ext/bg/js/yomichan.js2
-rw-r--r--ext/fg/js/client.js10
-rw-r--r--ext/fg/js/popup.js2
3 files changed, 7 insertions, 7 deletions
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js
index 6918432c..f0cbdf79 100644
--- a/ext/bg/js/yomichan.js
+++ b/ext/bg/js/yomichan.js
@@ -174,7 +174,7 @@ class Yomichan {
notifyTabs(name, value) {
chrome.tabs.query({}, (tabs) => {
for (const tab of tabs) {
- chrome.tabs.sendMessage(tab.id, {name: name, value: value}, () => null);
+ chrome.tabs.sendMessage(tab.id, {name, value}, () => null);
}
});
}
diff --git a/ext/fg/js/client.js b/ext/fg/js/client.js
index 932cd10f..31cc29cc 100644
--- a/ext/fg/js/client.js
+++ b/ext/fg/js/client.js
@@ -106,7 +106,7 @@ class Client {
range.setLength(length);
bgRenderText(
- {defs: definitions, root: this.fgRoot, options: this.options, sequence: sequence},
+ {defs: definitions, root: this.fgRoot, options: this.options, sequence},
'term-list.html',
(content) => {
this.definitions = definitions;
@@ -114,7 +114,7 @@ class Client {
bgCanAddNotes(definitions, ['vocabExp', 'vocabReading'], (states) => {
if (states !== null) {
- states.forEach((state, index) => this.popup.sendMessage('setActionState', {index: index, state: state, sequence: sequence}));
+ states.forEach((state, index) => this.popup.sendMessage('setActionState', {index, state, sequence}));
}
});
}
@@ -160,7 +160,7 @@ class Client {
bgAddNote(this.definitions[index], mode, (success) => {
if (success) {
- this.popup.sendMessage('setActionState', {index: index, state: state, sequence: this.sequence});
+ this.popup.sendMessage('setActionState', {index, state, sequence: this.sequence});
} else {
alert('Note could not be added');
}
@@ -171,7 +171,7 @@ class Client {
bgFindKanji(kanji, (definitions) => {
const sequence = ++this.sequence;
bgRenderText(
- {defs: definitions, root: this.fgRoot, options: this.options, sequence: sequence},
+ {defs: definitions, root: this.fgRoot, options: this.options, sequence},
'kanji-list.html',
(content) => {
this.definitions = definitions;
@@ -179,7 +179,7 @@ class Client {
bgCanAddNotes(definitions, ['kanji'], (states) => {
if (states !== null) {
- states.forEach((state, index) => this.popup.sendMessage('setActionState', {index: index, state: state, sequence: sequence}));
+ states.forEach((state, index) => this.popup.sendMessage('setActionState', {index, state, sequence}));
}
});
}
diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js
index 53359cf3..78106319 100644
--- a/ext/fg/js/popup.js
+++ b/ext/fg/js/popup.js
@@ -70,7 +70,7 @@ class Popup {
sendMessage(action, params, callback) {
if (this.popup !== null) {
- this.popup.contentWindow.postMessage({action: action, params: params}, '*');
+ this.popup.contentWindow.postMessage({action, params}, '*');
}
}