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

novicell-lazyload

Package Overview
Dependencies
Maintainers
10
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

novicell-lazyload - npm Package Compare versions

Comparing version 1.2.4 to 1.3.0

10

js/lazy-images.js

@@ -18,4 +18,6 @@ 'use strict';

window.lazySizesConfig.expand = 1000;
if (window.lazySizesConfig["useWebp"] == undefined) {
window.lazySizesConfig["useWebp"] = true
}
/*

@@ -44,3 +46,3 @@ * Lazyload

isSupportWebP(function(bool) {
if (bool) {
if (bool && window.lazySizesConfig.useWebp) {
url += "&format=webp"

@@ -70,3 +72,3 @@ }

if (bool) {
if (bool && window.lazySizesConfig.useWebp) {
url += "&format=webp"

@@ -81,3 +83,3 @@ }

if (bool) {
if (bool && window.lazySizesConfig.useWebp) {
src += "&format=webp"

@@ -84,0 +86,0 @@ }

6

package.json
{
"name": "novicell-lazyload",
"version": "1.2.4",
"version": "1.3.0",
"description": "Novicell script for lazyloading images.",

@@ -27,2 +27,6 @@ "main": "index.js",

"email": "hrm@novicell.dk"
},
{
"name": "Juozas Rastenis",
"email": "jra@novicell.dk"
}

@@ -29,0 +33,0 @@ ],

@@ -37,5 +37,18 @@ # 💤 Novicell Lazyload

```html
<script>
window.lazySizesConfig = {
// Options . . .
}
</script>
<script defer src="/dist/scripts/lazy.min.js"></script>
```
## Options
```js
window.lazySizesConfig = {
useWebp: true // Boolean (defaults to true). If true is used it will still check if browser supports WebP format and then add it
}
```
## Implementation

@@ -42,0 +55,0 @@ This script *lazyloads* by swapping the `data-src` or `data-srcset` to an actual `src` or `srcset`.

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