diff options
Diffstat (limited to 'ext/api.js')
-rw-r--r-- | ext/api.js | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -17,6 +17,10 @@ */ +function sendMessage(action, data, callback) { + window.chrome.runtime.sendMessage({action: action, data: data}, callback); +} + function findTerm(text, callback) { - window.chrome.runtime.sendMessage({action: 'define', text: text}, callback); + sendMessage('findTerm', {term: text}, callback); } |