diff options
Diffstat (limited to 'asset-sources/fietsboek.ts')
-rw-r--r-- | asset-sources/fietsboek.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/asset-sources/fietsboek.ts b/asset-sources/fietsboek.ts index 10c1490..296d9c0 100644 --- a/asset-sources/fietsboek.ts +++ b/asset-sources/fietsboek.ts @@ -179,8 +179,8 @@ function searchFriends() { fetch(FRIENDS_URL) .then((response) => response.json()) .then((response: [JsonFriend]) => { - const blueprint = (document.querySelector("#friendSearchBlueprint") as HTMLTemplateElement). - content; + const blueprint = + (document.querySelector("#friendSearchBlueprint") as HTMLTemplateElement).content; // Only show friends with a matching name let friends = response.filter( @@ -199,9 +199,10 @@ function searchFriends() { const button = (event.target as HTMLElement).closest("button")!; button.parentNode!.parentNode!.removeChild(button.parentNode!); - const added = (document.querySelector("#friendAddedBlueprint")! as HTMLTemplateElement). - content. - cloneNode(true) as DocumentFragment; + const added = + (document.querySelector("#friendAddedBlueprint")! as HTMLTemplateElement) + .content + .cloneNode(true) as DocumentFragment; (added.querySelector(".friend-name") as HTMLSpanElement). textContent = friend.name; added.querySelector("input")!.value = friend.id.toString(); @@ -259,7 +260,8 @@ function imageSelectorChanged(event: Event) { transfer.items.add(file); input.files = transfer.files; - const preview = (document.querySelector("#trackImagePreviewBlueprint") as HTMLTemplateElement). + const preview = + (document.querySelector("#trackImagePreviewBlueprint") as HTMLTemplateElement). content. cloneNode(true) as DocumentFragment; preview.querySelector("img")!.src = URL.createObjectURL(file); |