Amigolazy
AmigoLazy is a JS Script to add Lazyload to an Iframe. Mostly Iframes are load data from an external site, so its contain lot of resources form external sites, we are unable to control that resources but we can prevent by lazyloading Iframe.
Install / Use
/learn @AmigoDheena/AmigolazyREADME
AmigoLazy
AmigoLazy is a JS Script to add Lazyload to an Iframe. Mostly Iframes are load data from an external site, so its contain lot of resources form external sites, we are unable to control that resources but we can prevent by lazyloading Iframe.
How to use amigolazy
- Add this js file to your webpage
<script src="https://cdn.jsdelivr.net/gh/amigodheena/amigolazy@master/amigolazy.js"></script>
-
Add
class="amigolazy" -
lazy="5000"set your lazy time as millisecond -
replace
src=""asdata-src=""
Image
<img src="/wedding.jpg" style="width:100%">
<img class="amigolazy" lazy="5000" data-src="/wedding.jpg" style="width:100%">
Iframe
<iframe width="949" height="534" src="https://www.youtube.com/embed/JvEvTcXF-4Q" frameborder="0" allowfullscreen></iframe>
<iframe class="amigolazy" width="949" lazy="5000" height="534" data-src="https://www.youtube.com/embed/JvEvTcXF-4Q" frameborder="0" allowfullscreen></iframe>
Preventing Content Reflow
img[data-src]{
display: block;
min-height: 100px; /*as per your requirement*/
background-color: #c0c0c0; /* optional */
}
Contributors
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
