aboutsummaryrefslogtreecommitdiff
path: root/frontend/helper.ts
diff options
context:
space:
mode:
authorLia Lenckowski <lialenck@protonmail.com>2023-08-14 17:39:18 +0200
committerLia Lenckowski <lialenck@protonmail.com>2023-08-14 17:39:18 +0200
commit44e16504a1605d1d00f202863935767326cd453c (patch)
tree2bad385871dd1b602aff4d55477084ca541cbb0e /frontend/helper.ts
parent3df03c42763dccf2993a0a76bdf36e2cbb3674c7 (diff)
downloadfastbangs-44e16504a1605d1d00f202863935767326cd453c.tar
fastbangs-44e16504a1605d1d00f202863935767326cd453c.tar.bz2
fastbangs-44e16504a1605d1d00f202863935767326cd453c.tar.zst
implement searching for engines/bangs
Diffstat (limited to 'frontend/helper.ts')
-rw-r--r--frontend/helper.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/helper.ts b/frontend/helper.ts
index 2ecfc35..6e7ca5c 100644
--- a/frontend/helper.ts
+++ b/frontend/helper.ts
@@ -17,7 +17,7 @@ function apply_opts<E extends HTMLElement>(e: E, o: Opts<E>) {
if (o.onchange) e.onchange = () => o.onchange!(e)
if (o.for) (e as unknown as HTMLLabelElement).htmlFor = o.for
if (o.type && e instanceof HTMLInputElement) e.type = o.type
- if (o.href && e instanceof HTMLAnchorElement) e.href = o.href;
+ if (o.href && e instanceof HTMLAnchorElement) e.href = o.href
if (typeof o?.class == "string") e.classList.add(o.class)
if (typeof o?.class == "object") e.classList.add(...o.class)
}
@@ -26,7 +26,7 @@ export function e<K extends keyof HTMLElementTagNameMap>(name: K, opts: Opts<HTM
const el = document.createElement(name)
apply_opts(el, opts)
for (const c of children) {
- if (typeof c == "string") el.textContent += c;
+ if (typeof c == "string") el.textContent += c
else el.append(c)
}
return el