mirror of
https://github.com/revanced/revanced-website.git
synced 2025-04-29 22:24:31 +02:00
fix: improve search results
This commit is contained in:
parent
d4279a8038
commit
df59e12780
@ -35,9 +35,9 @@ body {
|
||||
|
||||
:root {
|
||||
--white: #fff;
|
||||
--accent-low-opacity: #9ed7ff50;
|
||||
--accent-color: #9fd5ff;
|
||||
--accent-color-two: hsl(207, 65%, 90%);
|
||||
--accent-low-opacity: #9ed7ff50;
|
||||
--bg-color: hsl(240, 2%, 11%);
|
||||
--grey-one: #252b31;
|
||||
--grey-two: #28313b;
|
||||
|
@ -15,9 +15,13 @@
|
||||
|
||||
let current: boolean = false;
|
||||
let searchTerm: string;
|
||||
$: searchTermLowerCase = searchTerm?.toLowerCase();
|
||||
|
||||
function search(patch: Patch) {
|
||||
if (patch.name.includes(searchTerm) || patch.description.includes(searchTerm)) {
|
||||
if (
|
||||
patch.description.toLowerCase().includes(searchTermLowerCase) ||
|
||||
patch.name.replace(/-/g, ' ').toLowerCase().includes(searchTermLowerCase)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user