Uname:Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64

403WebShell
403Webshell
Server IP : 146.59.209.152  /  Your IP : 216.73.216.152
Web Server : Apache
System : Linux webm009.cluster131.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User : monpetu ( 144298)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/monpetu/www/ipprint/wp-content/plugins/sureforms/modules/quick-action-sidebar/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/monpetu/www/ipprint/wp-content/plugins/sureforms/modules/quick-action-sidebar//index.js
/**
 * The Quick Access React App for Spectra Enhanced Editor.
 */
import { createRoot } from '@wordpress/element';
import Sidebar from './components/Sidebar';

// Toggles the sidebar based on the url parameters.
export const toggleSidebar = ( url ) => {
	const currentUrl = new URL( url );
	if ( '/wp-admin/site-editor.php' === currentUrl.pathname ) {
		if ( 'edit' === currentUrl.searchParams.get( 'canvas' ) ) {
			attachSidebarAfterLoading();
		} else {
			const container = document.querySelector( '.srfm-ee-quick-access' );
			if ( container ) {
				container.parentElement.remove();
			}
		}
	}
};

// Attaches the sidebar to the DOM.
export const attachSidebar = () => {
	const interval = setInterval( () => {
		const rootElement = document.querySelector(
			'.interface-interface-skeleton__body'
		);
		if ( ! rootElement ) {
			return;
		}

		const blockElement = document.querySelector(
			'.srfm-ee-quick-access-container'
		);
		if ( blockElement ) {
			clearInterval( interval );
			return;
		}

		clearInterval( interval );

		let container = rootElement.querySelector( '.srfm-ee-quick-access' );

		if ( ! container ) {
			container = document.createElement( 'div' );
			container.classList.add( 'srfm-ee-quick-access-container' );
			rootElement.insertBefore( container, rootElement.firstChild );
		}

		const root = createRoot( container );
		root.render( <Sidebar /> );
	}, 100 );
};

// Attaches the sidebar after the page is loaded ( in FSE editor).
const attachSidebarAfterLoading = () => {
	const skeletonInterval = setInterval( () => {
		const skeleton = document.querySelector(
			'.edit-site-editor__interface-skeleton'
		);
		if ( skeleton ) {
			if ( ! skeleton.classList.contains( 'is-loading' ) ) {
				clearInterval( skeletonInterval );
				attachSidebar();
			}
		}
	}, 100 );
};

Youez - 2016 - github.com/yon3zu
LinuXploit