{"id":15023763,"url":"https://github.com/englishextra/img-lightbox","last_synced_at":"2026-02-20T21:05:04.274Z","repository":{"id":55136267,"uuid":"131959174","full_name":"englishextra/img-lightbox","owner":"englishextra","description":"Responsive no-jQuery pure JS/CSS Lightbox for images, no dependencies, 10kb unminified source code, with demo","archived":false,"fork":false,"pushed_at":"2025-04-01T17:51:24.000Z","size":696,"stargazers_count":12,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T21:59:02.886Z","etag":null,"topics":["audiomack","browser","css","front-end","frontend","html","iframe","js","lightbox","no-dependencies","no-framework","no-jquery","pwa","soundcloud","ui","vanilla-javascript","vanilla-js","vimeo","webapp"],"latest_commit_sha":null,"homepage":"https://codepen.io/englishextra/full/YLQxRp/","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/englishextra.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-05-03T07:38:54.000Z","updated_at":"2025-10-04T13:57:49.000Z","dependencies_parsed_at":"2025-04-12T06:40:47.615Z","dependency_job_id":"d7bc1996-bfa3-430b-88ca-8996251c0034","html_url":"https://github.com/englishextra/img-lightbox","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/englishextra/img-lightbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/englishextra%2Fimg-lightbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/englishextra%2Fimg-lightbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/englishextra%2Fimg-lightbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/englishextra%2Fimg-lightbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/englishextra","download_url":"https://codeload.github.com/englishextra/img-lightbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/englishextra%2Fimg-lightbox/sbom","scorecard":{"id":377343,"data":{"date":"2025-08-11","repo":{"name":"github.com/englishextra/img-lightbox","commit":"b349a2ac5f6df7ce7f97c368f9804705dbcbcb09"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T14:33:57.577Z","repository_id":55136267,"created_at":"2025-08-18T14:33:57.577Z","updated_at":"2025-08-18T14:33:57.577Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29664501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T19:49:36.704Z","status":"ssl_error","status_checked_at":"2026-02-20T19:44:05.372Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["audiomack","browser","css","front-end","frontend","html","iframe","js","lightbox","no-dependencies","no-framework","no-jquery","pwa","soundcloud","ui","vanilla-javascript","vanilla-js","vimeo","webapp"],"created_at":"2024-09-24T19:59:25.019Z","updated_at":"2026-02-20T21:05:04.252Z","avatar_url":"https://github.com/englishextra.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# img-lightbox\n\nResponsive no-jQuery pure JS/CSS Lightbox for images, no dependencies, 10kb unminified source code, with demo\n\n[![npm](https://img.shields.io/npm/v/img-lightbox.svg)](https://www.npmjs.com/package/img-lightbox)\n[![Build Status](https://travis-ci.com/englishextra/img-lightbox.svg?branch=master)](https://travis-ci.com/englishextra/img-lightbox)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/2fbe9cbd4dcb4d3b8fe83dac98633f67)](https://www.codacy.com/manual/englishextra/img-lightbox/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=englishextra/img-lightbox\u0026amp;utm_campaign=Badge_Grade)\n[![jsdelivr](https://data.jsdelivr.com/v1/package/npm/img-lightbox/badge)](https://www.jsdelivr.com/package/npm/img-lightbox)\n\n## Demo\n\n[codepen](https://codepen.io/englishextra/full/YLQxRp/)\n[jsfiddle](https://fiddle.jshell.net/englishextra/8hhpbv4h/show/)\n[jsbin](https://output.jsbin.com/laxudog)\n\n## Features\n\n* Simple initialization\n* SPA / PWA friendly: prevents multiple same events assigning\n* Debounced launch, default 500ms, custom rate can be set with rate property of options object\n* Preloading spinner that is unset after onload event succeeds\n* Pure CSS Retina Ready UI images, no external ones (prompted by github.com/jasomdotnet, thanks)\n* Custom event callbacks\n\n## CDN\n\n### jsDelivr\n\n`https://cdn.jsdelivr.net/gh/englishextra/img-lightbox@latest/js/img-lightbox.min.js`\n`https://cdn.jsdelivr.net/gh/englishextra/img-lightbox@latest/css/img-lightbox.min.css`\n\n### unpkg\n\n`https://unpkg.com/img-lightbox@latest/js/img-lightbox.js`\n`https://unpkg.com/img-lightbox@latest/css/img-lightbox.css`\n\n## Install\n\n### npm\n\n`npm install img-lightbox`\n\n## Setup\n\n`class` is required, and can be any class name you choose (in this demo it's `img-lightbox-link`).\n`data-src` is another method to get the source URL when you do not want the link to lead to some real URL.\n`href` is required, and contains URL of your image.\nFor those who don't use 3rd-party scripts that interfere with links behaviour and don't force `window.location` they have no need in either `data-touch=\"true\"` or `{touch: true}`.\nWhen you have scripts that interfere, then to keep lightbox working, use `{touch: true}` or `data-touch=\"true\"` (you shouldn't enable this touch override if you have a full screen image in a lighbox link and have no other space to scroll down).\n`data-src` or `href` doesn't matter.\n[![Build Status](https://farm1.staticflickr.com/955/27854475488_5f82a379ca_z.jpg)](https://farm1.staticflickr.com/955/27854475488_5f82a379ca_z.jpg)\n\n```html\n\u003ca href=\"https://farm1.staticflickr.com/955/27854475488_4f2b7f52e4_k.jpg\"\nclass=\"img-lightbox-link\"\ndata-src=\"https://farm1.staticflickr.com/955/27854475488_4f2b7f52e4_k.jpg\"\naria-hidden=\"true\"\nrel=\"lightbox\"\u003e\u003cimg src=\"https://farm1.staticflickr.com/955/27854475488_5f82a379ca_z.jpg\" alt=\"Image Lightbox\" /\u003e\u003c/a\u003e\n```\n\n## Initialize\n\n```js\nimgLightbox(\"img-lightbox-link\");\n```\n\n## Tips\n\nSPA / PWA developers don't need to bother: work-related class is added to a link.\nThat way you avoid multiple assignments to a single element.\n\n## Examples of event handling\n\n```js\n(function(root) {\n  \"use strict\";\n  if (root.imgLightbox) {\n    imgLightbox(\"img-lightbox-link\", {\n      onCreated: function() {\n        /* show your preloader */\n      },\n      onLoaded: function() {\n        /* hide your preloader */\n      },\n      onError: function() {\n        /* hide your preloader */\n      },\n      onClosed: function() {\n        /* hide your preloader */\n      },\n      rate: 500 /* default: 500 */,\n      touch: false /* default: false - use with care for responsive images in links on vertical mobile screens */\n    });\n  }\n})(\"undefined\" !== typeof window ? window : this);\n```\n\n## GitHub\n\n[englishextra/img-lightbox](https://github.com/englishextra/img-lightbox)\n\n## License\n\nAvailable under [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenglishextra%2Fimg-lightbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenglishextra%2Fimg-lightbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenglishextra%2Fimg-lightbox/lists"}