This commit is contained in:
Alex Yatskov 2016-03-23 19:41:13 -07:00
parent 2fe2e993ee
commit 62a47278b5
3 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ function getRangeAtCursor(e, lookAhead) {
function onMouseDown(e) {
e.preventDefault();
// e.preventDefault();
const range = getRangeAtCursor(e, 20);
if (range === null) {

View File

@ -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;
}
}

View File

@ -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);
}