summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}