aboutsummaryrefslogtreecommitdiff
path: root/frontend/helper.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-11-06 20:28:27 +0100
committermetamuffin <metamuffin@disroot.org>2023-11-06 20:30:25 +0100
commit546a9cd375383fba9ee2fb6050935ca247e770f6 (patch)
tree73da81d815b403b91e3a62a26b0edce0b24d965f /frontend/helper.ts
parent556bbf51d928b0eb774b81e43b20c78bea191f7f (diff)
downloadfastbangs-546a9cd375383fba9ee2fb6050935ca247e770f6.tar
fastbangs-546a9cd375383fba9ee2fb6050935ca247e770f6.tar.bz2
fastbangs-546a9cd375383fba9ee2fb6050935ca247e770f6.tar.zst
insert hyperlink to source
Diffstat (limited to 'frontend/helper.ts')
-rw-r--r--frontend/helper.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/frontend/helper.ts b/frontend/helper.ts
index 827a204..c511b59 100644
--- a/frontend/helper.ts
+++ b/frontend/helper.ts
@@ -34,10 +34,8 @@ function apply_opts<E extends HTMLElement>(e: E, o: Opts<E>) {
export function e<K extends keyof HTMLElementTagNameMap>(name: K, opts: Opts<HTMLElementTagNameMap[K]>, ...children: (HTMLElement | string)[]): HTMLElementTagNameMap[K] {
const el = document.createElement(name)
apply_opts(el, opts)
- for (const c of children) {
- if (typeof c == "string") el.textContent += c
- else el.append(c)
- }
+ for (const c of children)
+ el.append(c)
return el
}