mirror of
https://github.com/searxng/searxng.git
synced 2025-08-02 18:12:21 +02:00
add toggle to resize infobox
This commit is contained in:
parent
57bad502a6
commit
0601f2bb48
12 changed files with 203 additions and 7 deletions
|
@ -204,6 +204,17 @@ $(document).ready(function(){
|
|||
$(a.target).parent().attr("aria-selected", "true");
|
||||
});
|
||||
});
|
||||
;$(document).ready(function() {
|
||||
// Hide infobox toggle if shrunk size already fits all content.
|
||||
$('.infobox').each(function() {
|
||||
var infobox_body = $(this).find('.infobox_body');
|
||||
var total_height = infobox_body.prop('scrollHeight') + infobox_body.find('img.infobox_part').height();
|
||||
var max_height = infobox_body.css('max-height').replace('px', '');
|
||||
if (total_height <= max_height) {
|
||||
$(this).find('.infobox_toggle').hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
;/**
|
||||
* searx is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue