aboutsummaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-07-25 20:28:56 -0700
committerAlex Yatskov <alex@foosoft.net>2016-07-25 20:28:56 -0700
commit80fedc4f7afd551481314585336199e53af843c5 (patch)
tree4f7d06a6936c47b0ab5d8c4aa72716bc967dae8f /ext/fg
parent2b2e6cba3f0a1f474191ba306b800a18819dde57 (diff)
Hook up sentence search extent to options
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/js/client.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/fg/js/client.js b/ext/fg/js/client.js
index a8fbaa68..e59718d6 100644
--- a/ext/fg/js/client.js
+++ b/ext/fg/js/client.js
@@ -25,7 +25,6 @@ class Client {
this.lastTextSource = null;
this.activateKey = 16;
this.activateBtn = 2;
- this.sentenceExtent = 200;
this.enabled = false;
this.options = {};
this.definitions = null;
@@ -97,7 +96,7 @@ class Client {
} else {
textSource.setEndOffset(length);
- const sentence = Client.extractSentence(textSource, this.sentenceExtent);
+ const sentence = Client.extractSentence(textSource, this.opts.sentenceExtent);
definitions.forEach((definition) => {
definition.url = window.location.href;
definition.sentence = sentence;