summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/dict.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/dict.js b/js/dict.js
index f8336d2..35e7223 100644
--- a/js/dict.js
+++ b/js/dict.js
@@ -1,13 +1,15 @@
'use strict';
$(document).ready(function() {
+ let Reader = parent.__get_reader();
+
$(window).on("mouseup touchend", function() {
if (!navigator.onLine) return;
const sel = getSelection().toString().trim();
if (sel.match(/^\w+$/)) {
- parent.Reader.lookupWord(sel, function() {
+ Reader.lookupWord(sel, function() {
getSelection().removeAllRanges();
});
}