summaryrefslogtreecommitdiff
path: root/read.html
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-02-02 13:47:04 +0300
committerAndrew Dolgov <[email protected]>2018-02-02 13:47:04 +0300
commitfa6a735fe5e1d4b995d9ef5db23f9dcc411237d9 (patch)
tree7b78fdd50f000b62f8ca29535791764ce320ead4 /read.html
parent10149818546d048bc0121e7e09570bcc028d2d25 (diff)
add search button to dict result dialog (uses google for now)
Diffstat (limited to 'read.html')
-rw-r--r--read.html9
1 files changed, 8 insertions, 1 deletions
diff --git a/read.html b/read.html
index 7f94593..74a39bd 100644
--- a/read.html
+++ b/read.html
@@ -137,11 +137,13 @@
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">Dictionary Lookup</h4>
</div>
+ <input type="hidden" class="dict_query" value=""/>
<div class="modal-body">
<div class="dict_result"> </div>
</div>
<div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+ <button type="button" class="dict_search_btn btn-default btn">Google</button>
+ <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
@@ -539,8 +541,13 @@
$('#dict-modal').on('shown.bs.modal', function() {
$(".dict_result").scrollTop(0);
+
})
+ $(".dict_search_btn").on("click", function() {
+ $("#dict-modal").modal('hide');
+ window.open("https://google.com/search?q=" + $(".dict_query").val());
+ });
$('#toc-modal').on('shown.bs.modal', function() {
function process_toc_sublist(row, list, nest) {