mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge pull request #112 from sanskar-mk2/bg-filter-feature
add bg filter feature on the frontend
This commit is contained in:
@ -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();
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
|
Reference in New Issue
Block a user