From fee57e4b3b0f7be188625c7430772f5470b16a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sat, 9 Jan 2021 21:00:30 +0100 Subject: [PATCH] add optimizeSpeed image-rendering attr, formatting --- app/src/components/VideoScroll.vue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/components/VideoScroll.vue b/app/src/components/VideoScroll.vue index 5825e4d..2698ea7 100644 --- a/app/src/components/VideoScroll.vue +++ b/app/src/components/VideoScroll.vue @@ -36,11 +36,11 @@ export default defineComponent({ onMounted(() => { const observer = new IntersectionObserver((entries, observer) => { entries.forEach((entry) => { - if (entry.isIntersecting){ + if (entry.isIntersecting) { const element = entry.target as HTMLImageElement; element.src = element.dataset.src!; } - }) + }); }, {rootMargin: "100px"}); Array.from((root.value as Element).children).forEach((el) => { observer.observe(el); @@ -84,9 +84,6 @@ function getMeta(url: string): Promise {