diff options
Diffstat (limited to 'js')
-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(); }); } |