aboutsummaryrefslogtreecommitdiff
path: root/Info/9
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2026-09-22 21:44:38 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2026-09-22 21:44:38 +0200
commit284968c2da70c48052d7b23efb32ed6364581fb0 (patch)
tree9b84b792212ccb1d526d1695acf7f59619ffb72f /Info/9
parent3f7b1f6a96011d1c912f8d92812dd21eb34f00c4 (diff)
downloadunterricht-284968c2da70c48052d7b23efb32ed6364581fb0.tar.gz
unterricht-284968c2da70c48052d7b23efb32ed6364581fb0.zip
planet: lazily load iframes
This prevents the page from jumping during buildup.
Diffstat (limited to 'Info/9')
-rw-r--r--Info/9/3/Planet/templates/h5p-autoembed.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/Info/9/3/Planet/templates/h5p-autoembed.js b/Info/9/3/Planet/templates/h5p-autoembed.js
index c26c0c84..8c5128e8 100644
--- a/Info/9/3/Planet/templates/h5p-autoembed.js
+++ b/Info/9/3/Planet/templates/h5p-autoembed.js
@@ -9,6 +9,8 @@ for (const div of autoEmbedLinksDivs) {
iframe.src = "https://" + "lernplattform.bycs.de/mod/hvp/embed.php?id=" + autoEmbedId;
iframe.frameborder = div.frameborder ? div.frameborder : 0;
iframe.allowfullscreen = div.allowfullscreen ? div.allowfullscreen : "allowfullscreen";
+ // Lazily load the iframe
+ iframe.loading = "lazy";
iframe.title = autoEmbedLink.title;
if (div.width) {
iframe.width = div.width;