Skip to content

Instantly share code, notes, and snippets.

View amrikmalhans's full-sized avatar
🎯
Focusing

Amrik Malhans amrikmalhans

🎯
Focusing
View GitHub Profile
@amrikmalhans
amrikmalhans / swiper-lazy-init.js
Last active December 23, 2025 20:35
Initializing Swiper carousels on demand
FIRST = 10
swipers = [] // array aligned with cards, or WeakMap
io = new IntersectionObserver((entries) => {
for (entry of entries) {
if (!entry.isIntersecting) continue
card = entry.target
io.unobserve(card)
This file has been truncated, but you can view the full file.
{
"lighthouseVersion": "12.8.0",
"requestedUrl": "https://www.campingworld.com/",
"mainDocumentUrl": "https://www.campingworld.com/",
"finalDisplayedUrl": "https://www.campingworld.com/",
"finalUrl": "https://www.campingworld.com/",
"fetchTime": "2025-07-26T12:47:02.199Z",
"gatherMode": "navigation",
"runWarnings": [],
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/140.0.0.0 Safari/537.36",