Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

img-lightbox

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

img-lightbox - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

4

CHANGELOG.md

@@ -6,2 +6,6 @@ # Changelog

## 0.2.1 - 2018-12-22
### Changed
- Fixed body scroll disabling on lightbox open https://github.com/englishextra/iframe-lightbox/issues/18
## 0.2.0 - 2018-12-21

@@ -8,0 +12,0 @@ ### Changed

13

js/img-lightbox.js

@@ -15,2 +15,3 @@ /*!

var docElem = document.documentElement || "";
var docBody = document.body || "";

@@ -128,2 +129,3 @@ var animatedClass = "animated";

docElem[classList].remove(imgLightboxOpenClass);
docBody[classList].remove(imgLightboxOpenClass);

@@ -166,10 +168,4 @@ };

container[_addEventListener]("click", handleImgLightboxContainer);
/* if (isTouch) {
container[_addEventListener]("touchstart", handleImgLightboxContainer);
} */
btnClose[_addEventListener]("click", handleImgLightboxContainer);
/* if (isTouch) {
btnClose[_addEventListener]("touchstart", handleImgLightboxContainer);
} */

@@ -185,5 +181,3 @@ root[_addEventListener]("keyup", function(ev) {

e[getAttribute]("href") || e[getAttribute]("data-src") || "";
var dataTouch =
e[getAttribute]("data-touch") || "";
var dataTouch = e[getAttribute]("data-touch") || "";

@@ -197,2 +191,3 @@ if (!hrefString) {

ev.preventDefault();
docElem[classList].add(imgLightboxOpenClass);
docBody[classList].add(imgLightboxOpenClass);

@@ -199,0 +194,0 @@ container[classList].remove(isLoadedClass);

{
"name": "img-lightbox",
"version": "0.2.0",
"version": "0.2.1",
"description": "Responsive no-jQuery pure JS/CSS Lightbox for images, no dependencies, 10kb unminified source code, with demo",

@@ -51,3 +51,3 @@ "keywords": ["lightbox",

"grunt-contrib-jshint": "^1.1.0",
"gulp": "^3.9.1",
"gulp": "^4.0.0",
"gulp-autoprefixer": "^6.0.0",

@@ -54,0 +54,0 @@ "gulp-babel": "^8.0.0",

@@ -38,11 +38,11 @@ # img-lightbox Demo

`https://cdn.jsdelivr.net/gh/englishextra/img-lightbox@0.2.0/js/img-lightbox.min.js`
`https://cdn.jsdelivr.net/gh/englishextra/img-lightbox@0.2.1/js/img-lightbox.min.js`
`https://cdn.jsdelivr.net/gh/englishextra/img-lightbox@0.2.0/css/img-lightbox.min.css`
`https://cdn.jsdelivr.net/gh/englishextra/img-lightbox@0.2.1/css/img-lightbox.min.css`
#### unpkg
`https://unpkg.com/img-lightbox@0.2.0/js/img-lightbox.js`
`https://unpkg.com/img-lightbox@0.2.1/js/img-lightbox.js`
`https://unpkg.com/img-lightbox@0.2.0/css/img-lightbox.css`
`https://unpkg.com/img-lightbox@0.2.1/css/img-lightbox.css`

@@ -67,2 +67,8 @@ ### Install

For 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}`.
When you have scripts that interfere, then to keep lightbox working, use `{touch: true}` or `data-touch="true"`.
`data-src` or `href` doesn't matter, but you shouldn't enable `touch` override if you have a full screen image in a lighbox link and have no other space to scroll down.
[![Build Status](https://farm1.staticflickr.com/955/27854475488_5f82a379ca_z.jpg)](https://farm1.staticflickr.com/955/27854475488_5f82a379ca_z.jpg)

@@ -69,0 +75,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc