1
0
mirror of https://github.com/searxng/searxng.git synced 2024-09-20 12:00:46 +02:00
searxng/searx/static/themes/oscar/js/searx_src/infobox.js
2020-08-10 00:12:45 -07:00

12 lines
495 B
JavaScript

$(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();
}
});
});