{"id":15747320,"url":"https://github.com/englishextra/iframe-lightbox","last_synced_at":"2025-08-23T05:07:28.775Z","repository":{"id":55136275,"uuid":"92613799","full_name":"englishextra/iframe-lightbox","owner":"englishextra","description":"Responsive no-jQuery pure JS/CSS Lightbox for iframes, no dependencies, customizable aspect ratio, 5kb unminified source code, with demo","archived":false,"fork":false,"pushed_at":"2025-04-01T17:46:09.000Z","size":535,"stargazers_count":32,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-23T05:07:27.206Z","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","youtube"],"latest_commit_sha":null,"homepage":"https://codepen.io/englishextra/pen/jmjayV","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":"2017-05-27T17:30:25.000Z","updated_at":"2025-05-02T02:20:02.000Z","dependencies_parsed_at":"2025-04-13T15:44:57.960Z","dependency_job_id":null,"html_url":"https://github.com/englishextra/iframe-lightbox","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/englishextra/iframe-lightbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/englishextra%2Fiframe-lightbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/englishextra%2Fiframe-lightbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/englishextra%2Fiframe-lightbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/englishextra%2Fiframe-lightbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/englishextra","download_url":"https://codeload.github.com/englishextra/iframe-lightbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/englishextra%2Fiframe-lightbox/sbom","scorecard":{"id":377342,"data":{"date":"2025-08-11","repo":{"name":"github.com/englishextra/iframe-lightbox","commit":"0b3eb58085dd437bdc0c3c491420572c690bb9c3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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:56.785Z","repository_id":55136275,"created_at":"2025-08-18T14:33:56.786Z","updated_at":"2025-08-18T14:33:56.786Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271745482,"owners_count":24813502,"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-08-23T02:00:09.327Z","response_time":69,"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":["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","youtube"],"created_at":"2024-10-04T05:04:51.175Z","updated_at":"2025-08-23T05:07:28.749Z","avatar_url":"https://github.com/englishextra.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iframe-lightbox\n\nResponsive no-jQuery pure JS/CSS Lightbox for iframes, no dependencies, customizable aspect ratio, 5kb unminified source code, with demo\n\n[![npm](https://img.shields.io/npm/v/iframe-lightbox.svg)](https://www.npmjs.com/package/iframe-lightbox)\n[![Build Status](https://travis-ci.com/englishextra/iframe-lightbox.svg?branch=master)](https://travis-ci.com/englishextra/iframe-lightbox)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/369642c14d3344bebe134c76f0f5dde8)](https://www.codacy.com/manual/englishextra/iframe-lightbox/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=englishextra/iframe-lightbox\u0026amp;utm_campaign=Badge_Grade)\n[![jsdelivr](https://data.jsdelivr.com/v1/package/npm/iframe-lightbox/badge)](https://www.jsdelivr.com/package/npm/iframe-lightbox)\n\n## Demo\n\n[codepen](https://codepen.io/englishextra/full/jmjayV/)\n[jsfiddle](https://fiddle.jshell.net/englishextra/8pzy6uhr/show/)\n[jsbin](https://output.jsbin.com/saqine)\n\n## Features\n\n* Simple initialization\n* Nicely fits YouTube / Vimeo / SoundCloud / Audiomack or other URL via iframe\n* Customizable aspect ratio via `data-padding-bottom` attribute\n* Iframe content can be scrollable or not (default)\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/iframe-lightbox@latest/js/iframe-lightbox.min.js`\n`https://cdn.jsdelivr.net/gh/englishextra/iframe-lightbox@latest/css/iframe-lightbox.min.css`\n\n### unpkg\n\n`https://unpkg.com/iframe-lightbox@latest/js/iframe-lightbox.js`\n`https://unpkg.com/iframe-lightbox@latest/css/iframe-lightbox.css`\n\n## Install\n\n### npm\n\n`npm install iframe-lightbox`\n\n## Setup\n\n`class` is not required. `iframe-lightbox-link` is used here to select elements. You may use some other method for elements selection.\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 content.\n`data-padding-bottom` is optional, and can be used to change default 16/9 Aspect Ratio to the one of yours with the formula: a percentage value of\n\n```txt\nheight/width*100\n```\n\nFor instance, HD would be: 9 / 16 * 100 + \"%\"\nSo, for YouTube or Vimeo, `data-padding-bottom=\"56.25%\"` would be enough.\nFor SoundCloud embedded player via iframe, use: `data-padding-bottom=\"166px\"`.\nFor Audiomack embedded player via iframe, use: `data-padding-bottom=\"252px\"`.\nFor Scrollable content set `data-scrolling=\"true\"`, or add `scrolling` option property with `true`.\nThe `data-scrolling` is optional, makes iframe content scrollable or not (default); this can be set with `scrolling` option property.\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\"`.\n`data-src` or `href` doesn't matter, but 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\n### YouTube\n\n```html\n\u003ca\n  class=\"iframe-lightbox-link\"\n  href=\"https://www.youtube.com/embed/KK9bwTlAvgo?autoplay=0\"\n  data-padding-bottom=\"56.25%\"\u003eYouTube\u003c/a\u003e\n```\n\n### Vimeo\n\n```html\n\u003ca\n  class=\"iframe-lightbox-link\"\n  href=\"https://player.vimeo.com/video/165424115?autoplay=false\"\n  data-padding-bottom=\"56.25%\"\u003eVimeo\u003c/a\u003e\n```\n\n### SoundCloud\n\n```html\n\u003ca\n  class=\"iframe-lightbox-link\"\n  href=\"https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/317031598\u0026amp;auto_play=false\u0026amp;hide_related=false\u0026amp;show_comments=true\u0026amp;show_user=true\u0026amp;show_reposts=false\u0026amp;visual=true\"\n  data-padding-bottom=\"166px\"\u003eSoundCloud\u003c/a\u003e\n```\n\n### Audiomack\n\n```html\n\u003ca\n  class=\"iframe-lightbox-link\"\n  href=\"https://audiomack.com/embed/song/lax/go-low\"\n  data-padding-bottom=\"252px\"\u003eAudiomack\u003c/a\u003e\n```\n\n## Scrollable content\n\n```html\n\u003ca\n  class=\"iframe-lightbox-link\"\n  href=\"https://www.w3.org/\"\n  data-scrolling=\"true\"\u003eScrollable content\u003c/a\u003e\n```\n\n## Initialize\n\n```js\n[].forEach.call(document.getElementsByClassName(\"iframe-lightbox-link\"), function (el) {\n  el.lightbox = new IframeLightbox(el);\n});\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, document) {\n  \"use strict\";\n  [].forEach.call(document.getElementsByClassName(\"iframe-lightbox-link\"), function(el) {\n    el.lightbox = new IframeLightbox(el, {\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      scrolling: false,\n      /* default: false */\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, document);\n```\n\n## GitHub\n\nInspired by [squeral/lightbox](https://github.com/squeral/lightbox)\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%2Fiframe-lightbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenglishextra%2Fiframe-lightbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenglishextra%2Fiframe-lightbox/lists"}