mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-11 13:46:17 +00:00
fix: improve search results
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user