summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-09-13 10:34:20 +0300
committerAndrew Dolgov <[email protected]>2020-09-13 10:34:20 +0300
commit0e5192a7cbd52663091f6093b2728b7779320dcf (patch)
treea7ad7fbffad19578945629a21bd1a5af6ae46c54
parente77cd07978a79988822bb9d806023d23cebc4150 (diff)
fix dict.js invoking reader incorrectly
-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();
});
}