{"id":13463901,"url":"https://github.com/rgrove/lazyload","last_synced_at":"2025-10-22T16:02:11.728Z","repository":{"id":416402,"uuid":"36001","full_name":"rgrove/lazyload","owner":"rgrove","description":":skull: An ancient tiny JS and CSS loader from the days before everyone had written one. Unmaintained.","archived":true,"fork":false,"pushed_at":"2015-12-29T07:37:07.000Z","size":666,"stargazers_count":1393,"open_issues_count":12,"forks_count":289,"subscribers_count":71,"default_branch":"master","last_synced_at":"2025-09-21T20:02:27.176Z","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/rgrove.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY","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":"2008-07-22T04:01:28.000Z","updated_at":"2025-09-15T13:43:52.000Z","dependencies_parsed_at":"2022-07-04T15:12:31.595Z","dependency_job_id":null,"html_url":"https://github.com/rgrove/lazyload","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/rgrove/lazyload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgrove%2Flazyload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgrove%2Flazyload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgrove%2Flazyload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgrove%2Flazyload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rgrove","download_url":"https://codeload.github.com/rgrove/lazyload/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgrove%2Flazyload/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276361150,"owners_count":25628853,"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","status":"online","status_checked_at":"2025-09-22T02:00:08.972Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-07-31T14:00:30.172Z","updated_at":"2025-09-27T07:31:33.977Z","avatar_url":"https://github.com/rgrove.png","language":"JavaScript","funding_links":[],"categories":["Loaders","JavaScript","目录"],"sub_categories":[],"readme":"LazyLoad\n========\n\n**Note:** LazyLoad is no longer being maintained. I'm not responding to issues or pull requests, since I don't use this project anymore and don't have time to work on it. Please feel free to fork it if you want to continue development on it.\n\nLazyLoad is a tiny (only 966 bytes minified and gzipped), dependency-free\nJavaScript utility that makes it super easy to load external JavaScript and CSS\nfiles on demand.\n\nWhenever possible, LazyLoad will automatically load resources in parallel while\nensuring execution order when you specify an array of URLs to load. In browsers\nthat don't preserve the execution order of asynchronously-loaded scripts,\nLazyLoad will safely load the scripts sequentially.\n\nUse LazyLoad when you need a small, fast, safe dynamic JS or CSS loader, but\ndon't need the overhead of dependency management or other extra functionality\nthat larger script loaders provide.\n\nDownloads\n---------\n\n  * [lazyload.js](https://github.com/rgrove/lazyload/raw/master/lazyload.js) (full source)\n\nUsage\n-----\n\nUsing LazyLoad is simple. Just call the appropriate method -- `css()` to load\nCSS, `js()` to load JavaScript -- and pass in a URL or array of URLs to load.\nYou can also provide a callback function if you'd like to be notified when the\nresources have finished loading, as well as an argument to pass to the callback\nand a context in which to execute the callback.\n\n```js\n// Load a single JavaScript file and execute a callback when it finishes.\nLazyLoad.js('http://example.com/foo.js', function () {\n  alert('foo.js has been loaded');\n});\n\n// Load multiple JS files and execute a callback when they've all finished.\nLazyLoad.js(['foo.js', 'bar.js', 'baz.js'], function () {\n  alert('all files have been loaded');\n});\n\n// Load a CSS file and pass an argument to the callback function.\nLazyLoad.css('foo.css', function (arg) {\n  alert(arg);\n}, 'foo.css has been loaded');\n\n// Load a CSS file and execute the callback in a different scope.\nLazyLoad.css('foo.css', function () {\n  alert(this.foo); // displays 'bar'\n}, null, {foo: 'bar'});\n```\n\nSupported Browsers\n------------------\n\n  * Firefox 2+\n  * Google Chrome\n  * Internet Explorer 6+\n  * Opera 9+\n  * Safari 3+\n  * Mobile Safari\n  * Android\n\nOther browsers may work, but haven't been tested. It's a safe bet that anything\nbased on a recent version of Gecko or WebKit will probably work.\n\nCaveats\n-------\n\nAll browsers support parallel loading of CSS. However, only Firefox and Opera\ncurrently support parallel script loading while preserving execution order. To\nensure that scripts are always executed in the correct order, LazyLoad will load\nall scripts sequentially in browsers other than Firefox and Opera. Hopefully\nother browsers will improve their parallel script loading behavior soon.\n\nLicense\n-------\n\nCopyright (c) 2011 Ryan Grove (ryan@wonko.com).\nAll rights reserved.\n \nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the 'Software'), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgrove%2Flazyload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frgrove%2Flazyload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgrove%2Flazyload/lists"}