Merge pull request #112 from sanskar-mk2/bg-filter-feature

add bg filter feature on the frontend
This commit is contained in:
Cohee
2023-04-20 14:25:10 +03:00
committed by GitHub
2 changed files with 13 additions and 0 deletions

View File

@ -5075,4 +5075,16 @@ $(document).ready(function () {
closeMessageEditor();
}
});
$("#bg-filter").on("input", function() {
const filterValue = $(this).val().toLowerCase();
$("#bg_menu_content > div").each(function() {
const $bgContent = $(this);
if ($bgContent.attr("title").toLowerCase().includes(filterValue)) {
$bgContent.show();
} else {
$bgContent.hide();
}
});
});
})