From 585e4617e85abf057b6ba50750d295d0c6e2458c Mon Sep 17 00:00:00 2001 From: syeopite Date: Thu, 14 Oct 2021 08:18:44 -0700 Subject: [PATCH] Lazy load (some) images --- src/invidious/comments.cr | 6 +++--- src/invidious/mixes.cr | 2 +- src/invidious/playlists.cr | 2 +- src/invidious/views/components/item.ecr | 10 +++++----- src/invidious/views/watch.ecr | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/invidious/comments.cr b/src/invidious/comments.cr index a5506b039..9c7882534 100644 --- a/src/invidious/comments.cr +++ b/src/invidious/comments.cr @@ -329,7 +329,7 @@ def template_youtube_comments(comments, locale, thin_mode, is_replies = false) html << <<-END_HTML
- +

@@ -349,7 +349,7 @@ def template_youtube_comments(comments, locale, thin_mode, is_replies = false) html << <<-END_HTML

- +
END_HTML @@ -410,7 +410,7 @@ def template_youtube_comments(comments, locale, thin_mode, is_replies = false) html << <<-END_HTML
- +
diff --git a/src/invidious/mixes.cr b/src/invidious/mixes.cr index 55b011741..63ea434fc 100644 --- a/src/invidious/mixes.cr +++ b/src/invidious/mixes.cr @@ -97,7 +97,7 @@ def template_mix(mix)
  • - +

    #{recode_length_seconds(video["lengthSeconds"].as_i)}

    #{video["title"]}

    diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.cr index 5034844e3..7940dc1f0 100644 --- a/src/invidious/playlists.cr +++ b/src/invidious/playlists.cr @@ -535,7 +535,7 @@ def template_playlist(playlist)
  • - +

    #{recode_length_seconds(video["lengthSeconds"].as_i)}

    #{video["title"]}

    diff --git a/src/invidious/views/components/item.ecr b/src/invidious/views/components/item.ecr index d084bfd4d..5788bf513 100644 --- a/src/invidious/views/components/item.ecr +++ b/src/invidious/views/components/item.ecr @@ -5,7 +5,7 @@
    <% if !env.get("preferences").as(Preferences).thin_mode %>
    - "/> + "/>
    <% end %>

    <%= HTML.escape(item.author) %>

    @@ -23,7 +23,7 @@
    <% if !env.get("preferences").as(Preferences).thin_mode %>
    - "/> + "/>

    <%= number_with_separator(item.video_count) %> videos

    <% end %> @@ -36,7 +36,7 @@
    <% if !env.get("preferences").as(Preferences).thin_mode %>