diff options
author | Andrew Dolgov <[email protected]> | 2020-09-13 10:34:20 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-09-13 10:34:20 +0300 |
commit | 0e5192a7cbd52663091f6093b2728b7779320dcf (patch) | |
tree | a7ad7fbffad19578945629a21bd1a5af6ae46c54 | |
parent | e77cd07978a79988822bb9d806023d23cebc4150 (diff) |
fix dict.js invoking reader incorrectly
-rw-r--r-- | js/dict.js | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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(); }); } |