{"id":16858024,"url":"https://github.com/leeoniya/notyet","last_synced_at":"2025-07-05T16:38:06.863Z","repository":{"id":42998831,"uuid":"196297158","full_name":"leeoniya/notyet","owner":"leeoniya","description":"Lazy image \u0026 media loader","archived":false,"fork":false,"pushed_at":"2022-07-20T11:25:04.000Z","size":27,"stargazers_count":14,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T08:30:56.481Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leeoniya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-11T01:19:15.000Z","updated_at":"2024-03-08T12:21:36.000Z","dependencies_parsed_at":"2022-09-10T00:00:16.968Z","dependency_job_id":null,"html_url":"https://github.com/leeoniya/notyet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leeoniya/notyet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leeoniya%2Fnotyet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leeoniya%2Fnotyet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leeoniya%2Fnotyet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leeoniya%2Fnotyet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leeoniya","download_url":"https://codeload.github.com/leeoniya/notyet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leeoniya%2Fnotyet/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263772399,"owners_count":23509115,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T14:11:14.726Z","updated_at":"2025-07-05T16:38:06.776Z","avatar_url":"https://github.com/leeoniya.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## NotYet\n\nLazy image \u0026 media loader _(MIT Licensed)_\n\n---\n### Introduction\n\nNotYet is a lazy image \u0026 media loader created from Jeremy Wagner's excellent [yall.js](https://github.com/malchata/yall.js), but significantly refactored and exposes a different API.\n\n**Features** (inherited from yall.js)\n\n- Tiny (~1.5k min)\n- Can lazy-load images, backgrounds, videos \u0026 iframes\n- Supports SEO by instantly loading for common bot user-agents\n- Requires IntersectionObserver\n- Can use MutationObserver to track DOM changes\n\n**Differences**\n\n- No mutation of `classList` or `className` [Issue #59](https://github.com/malchata/yall.js/issues/59)\n- Backgrounds are lazy-loaded by setting `.lazy` and `data-bg` instead of `.lazy-bg` (NotYet will set `element.style.backgroundImage` rather than `classList`).\n- If IntersectionObserver is absent, falls back to instant loading [Issue #51](https://github.com/malchata/yall.js/issues/51)\n- `.lazy` should be set on `\u003cpicture\u003e` rather than a child `\u003cimg\u003e` fallback element. Note that by default `\u003cpicture\u003e` is an [inline element](https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements#Elements) which will not vertically expand to the size of its contents; simply set it to something like `picture { display: inline-block }` in your base stylesheet.\n- No event binding pass-through (https://github.com/malchata/yall.js#events)\n- `willLoad(element)` event\n- No use of requestIdleCallback - this use case does not benefit much from it\n- Can be isolated to specific container elements\n- Fewer configurable options\n- Smaller devDeps (13.9 MB vs 35.4 MB)\n\n---\n### API\n\n```html\n\u003cbody\u003e\n    \u003cimg class=\"lazy\" src=\"placeholder.jpg\" data-src=\"1x.jpg\" data-srcset=\"2x.jpg 2x, 1x.jpg 1x\"\u003e\n\n    \u003cpicture class=\"lazy\"\u003e\n        \u003csource data-srcset=\"2x.webp 2x, 1x.webp 1x\" type=\"image/webp\"\u003e\n        \u003cimg src=\"placeholder.jpg\" data-src=\"1x.jpg\" data-srcset=\"2x.jpg 2x, 1x.jpg 1x\"\u003e\n    \u003c/picture\u003e\n\n    \u003cvideo class=\"lazy\" data-poster=\"placeholder.jpg\" controls preload=\"none\"\u003e\n      \u003csource src=\"video.webm\" type=\"video/webm\"\u003e\n      \u003csource src=\"video.mp4\" type=\"video/mp4\"\u003e\n    \u003c/video\u003e\n\n    \u003ciframe class=\"lazy\" data-src=\"iframe.html\"\u003e\u003c/iframe\u003e\n\n    \u003cdiv class=\"lazy\" data-bg=\"background.jpg\"\u003e\u003c/div\u003e\n\u003c/body\u003e\n```\n\n```js\ndocument.addEventListener(\"DOMContentLoaded\", () =\u003e {\n    notyet({\n        target: document.body,\n        mutations: true,\n        class: \"lazy\",\n        threshold: \"200px\",\n        willLoad: el =\u003e {\n            console.log(el);\n        }\n    });\n});\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleeoniya%2Fnotyet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleeoniya%2Fnotyet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleeoniya%2Fnotyet/lists"}