summaryrefslogtreecommitdiff
path: root/js/read.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-06-06 13:36:17 +0300
committerAndrew Dolgov <[email protected]>2017-06-06 13:36:17 +0300
commit36075d3f6a1c5785f8ffe959b2a86421f3673d24 (patch)
treec434522941ac208d686bb09549a66b270d76ab13 /js/read.js
parent7e4ee45037eb013be2311cecc0af4dd8f3a2258b (diff)
popup dictionary window on touch events
Diffstat (limited to 'js/read.js')
-rw-r--r--js/read.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/read.js b/js/read.js
index 0f83583..9ca4515 100644
--- a/js/read.js
+++ b/js/read.js
@@ -205,3 +205,17 @@ function search() {
function toggle_transitions(elem) {
localforage.setItem("epube.disable-transitions", elem.checked);
}
+
+function dict_lookup(word, callback) {
+ $.post("backend.php", {op: 'define', word: word}, function(data) {
+ if (data) {
+
+ $(".dict_result").html(data.result.join("<br/>"));
+ $("#dict-modal").modal('show');
+
+ if (callback) callback();
+ }
+ });
+}
+
+