summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-03-23 19:41:13 -0700
committerAlex Yatskov <alex@foosoft.net>2016-03-23 19:41:13 -0700
commit62a47278b5f5751ceaac18a26659c794fbc0ed84 (patch)
treeca9d9733cfc30ea762ecc866ce5dbd35440076c3
parent2fe2e993ee1cdc80c91b03809a715f62995a8132 (diff)
WIP
-rw-r--r--ext/content.js2
-rw-r--r--ext/jp/init.js2
-rw-r--r--ext/util.js2
3 files changed, 3 insertions, 3 deletions
diff --git a/ext/content.js b/ext/content.js
index c36b7381..5ff0031e 100644
--- a/ext/content.js
+++ b/ext/content.js
@@ -37,7 +37,7 @@ function getRangeAtCursor(e, lookAhead) {
function onMouseDown(e) {
- e.preventDefault();
+ // e.preventDefault();
const range = getRangeAtCursor(e, 20);
if (range === null) {
diff --git a/ext/jp/init.js b/ext/jp/init.js
index 81c06d3d..d3345a38 100644
--- a/ext/jp/init.js
+++ b/ext/jp/init.js
@@ -33,7 +33,7 @@ const trans = new Translator(res, onInit);
function onMessage(request, sender, callback) {
switch (request.action.toLowerCase()) {
case 'define':
- callback(trans.findTerm(request.term));
+ callback(trans.findTerm(request.text));
break;
}
}
diff --git a/ext/util.js b/ext/util.js
index 8523fe22..0b92cde0 100644
--- a/ext/util.js
+++ b/ext/util.js
@@ -18,5 +18,5 @@
function findTerm(text, callback) {
- chrome.runtime.sendMessage({action: 'define', text: text}, callback);
+ window.chrome.runtime.sendMessage({action: 'define', text: text}, callback);
}