mirror of
https://github.com/ivuorinen/homebrew-tap.git
synced 2026-02-19 18:51:57 +00:00
chore: fixes, several improvements and refactorings (#2)
* chore: fixes * chore: rubocop fixes, linting, etc. * chore: switching to use `brew style` only * chore: use `brew style` for linting, skip example formulae in ci.yml * chore(lint): fixes, additions and tweaks
This commit is contained in:
@@ -19,7 +19,9 @@
|
||||
}
|
||||
|
||||
function getSystemTheme() {
|
||||
return window.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
||||
return window.matchMedia?.("(prefers-color-scheme: dark)").matches
|
||||
? "dark"
|
||||
: "light";
|
||||
}
|
||||
|
||||
function getCurrentTheme() {
|
||||
@@ -137,8 +139,11 @@
|
||||
const cards = document.querySelectorAll(".formula-card");
|
||||
|
||||
cards.forEach((card) => {
|
||||
const text = `${card.querySelector("h3")?.textContent || ""} ${card.querySelector("p")?.textContent || ""}`;
|
||||
card.style.display = !searchTerm || fuzzyMatch(searchTerm, text) ? "" : "none";
|
||||
const text = `${card.querySelector("h3")?.textContent || ""} ${
|
||||
card.querySelector("p")?.textContent || ""
|
||||
}`;
|
||||
card.style.display =
|
||||
!searchTerm || fuzzyMatch(searchTerm, text) ? "" : "none";
|
||||
});
|
||||
}
|
||||
searchInput.addEventListener("input", () => {
|
||||
|
||||
Reference in New Issue
Block a user