403Webshell
Server IP : 167.179.152.94  /  Your IP : 216.73.216.169
Web Server : Apache/2.4.66 (Debian)
System : Linux 6d8cbb3dc321 6.8.0-117-generic #117-Ubuntu SMP PREEMPT_DYNAMIC Tue May 5 19:26:24 UTC 2026 x86_64
User :  ( 1000)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/html/wp-content/plugins/visual-portfolio/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/wp-content/plugins/visual-portfolio/assets/js/lazyload.js
// Recalculate image size if parent is <picture>
document.addEventListener('lazybeforesizes', (e) => {
	// for some reason sometimes e.detail is undefined, so we need to check it.
	if (!e.detail || !e.detail.width || !e.target) {
		return;
	}

	const parent = e.target.closest(':not(picture)');

	if (parent) {
		e.detail.width = parent.clientWidth || e.detail.width;
	}
});

/**
 * Remove <noscript> tag.
 * Some of optimization plugin make something, that killed our styles with noscript tag.
 * Related topic: https://wordpress.org/support/topic/visual-portfolio-and-sg-optimizer-dont-play-well/
 */
document.addEventListener('lazybeforeunveil', (e) => {
	const prevEl = e.target.previousElementSibling;

	if (prevEl && prevEl.matches('noscript')) {
		prevEl.remove();
	}
});

Youez - 2016 - github.com/yon3zu
LinuXploit