Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wp-smush.../_src/js/frontend
File: lazy-load.js
import lazySizes from 'lazysizes';
[0] Fix | Delete
( () => {
[1] Fix | Delete
'use strict';
[2] Fix | Delete
// Lazyload for background images.
[3] Fix | Delete
const lazyloadBackground = ( element ) => {
[4] Fix | Delete
let bgValue = element.getAttribute( 'data-bg-image' );
[5] Fix | Delete
let property = 'background-image';
[6] Fix | Delete
if ( ! bgValue ) {
[7] Fix | Delete
bgValue = element.getAttribute( 'data-bg' );
[8] Fix | Delete
property = 'background';
[9] Fix | Delete
}
[10] Fix | Delete
[11] Fix | Delete
if ( bgValue ) {
[12] Fix | Delete
const importantRegex = /\s*\!\s*important/i;
[13] Fix | Delete
const value = bgValue.replace( importantRegex, '' );
[14] Fix | Delete
const priority = value !== bgValue ? 'important' : '';
[15] Fix | Delete
element.style.setProperty( property, value, priority );
[16] Fix | Delete
}
[17] Fix | Delete
};
[18] Fix | Delete
[19] Fix | Delete
document.addEventListener( 'lazybeforeunveil', function( e ) {
[20] Fix | Delete
// Lazy background image.
[21] Fix | Delete
lazyloadBackground( e.target );
[22] Fix | Delete
} );
[23] Fix | Delete
[24] Fix | Delete
lazySizes.init();
[25] Fix | Delete
} )();
[26] Fix | Delete
[27] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function