From 0e5192a7cbd52663091f6093b2728b7779320dcf Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 13 Sep 2020 10:34:20 +0300 Subject: fix dict.js invoking reader incorrectly --- js/dict.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); }); } -- cgit v1.2.3