403Webshell
Server IP : 38.190.208.107  /  Your IP : 216.73.217.21
Web Server : nginx/1.28.1
System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64
User : root ( 0)
PHP Version : 8.2.28
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/wp.10/wp-content/themes/blocksy/static/js/frontend/entry-points/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/wp.10/wp-content/themes/blocksy/static/js/frontend/entry-points/menus.js
import ctEvents from 'ct-events'
import { getCurrentScreen } from '../helpers/current-screen'

const loadMenuEntry = () => import('../header/menu')

const onlyWithSubmenus = (menu) =>
	menu.querySelector('.menu-item-has-children') ||
	menu.querySelector('.page_item_has_children')

export const menuEntryPoints = [
	{
		els: () =>
			[
				...document.querySelectorAll(
					'header [data-device="desktop"] [data-id*="menu"] > .menu'
				),
				...document.querySelectorAll('.ct-header-account > ul'),
			].filter((menu) => onlyWithSubmenus(menu)),
		load: () => import('../header/sub-menu-open-logic'),
		events: ['ct:header:refresh-menu-submenus'],
	},

	{
		els: () => [
			...document.querySelectorAll(
				'header [data-device="desktop"] [data-id^="menu"][data-responsive]'
			),
		],
		load: () => import('../header/responsive-desktop-menu'),
		events: ['ct:header:responsive-menu:refresh'],
		condition: () => {
			if (getCurrentScreen() !== 'desktop') {
				return false
			}

			return [
				...document.querySelectorAll(
					'header [data-device="desktop"] [data-id^="menu"][data-responsive]'
				),
			].some((menu) => {
				if (!menu.firstElementChild) {
					return false
				}

				const menuRect = menu.firstElementChild.getBoundingClientRect()

				const allEls = [
					...menu
						.closest('[data-row]')
						.querySelectorAll('[data-items] > [data-id]'),
				]
					.filter((el) => el !== menu)
					.filter((el) => {
						const elRect = el.getBoundingClientRect()

						return [
							menuRect,

							...[...menu.firstElementChild.children].map(
								(child) => child.getBoundingClientRect()
							),
						].some((rect) => {
							const intersectsLeftEdge =
								elRect.left < rect.left &&
								elRect.right > rect.left

							const intersectsRightEdge =
								elRect.right > rect.right &&
								elRect.left < rect.right

							const isInside =
								elRect.left > rect.left &&
								elRect.right < rect.right

							return (
								intersectsLeftEdge ||
								intersectsRightEdge ||
								isInside
							)
						})
					})

				const parentRect = menu.parentElement.getBoundingClientRect()

				const fitsLeftSide = menuRect.left > parentRect.left
				const fitsRightSide = menuRect.right < parentRect.right

				const fits =
					fitsLeftSide && fitsRightSide && allEls.length === 0

				if (fits) {
					menu.dataset.responsive = 'yes'
				}

				return !fits
			})
		},
	},
]

Youez - 2016 - github.com/yon3zu
LinuXploit