SILENT KILLERPanel

Current Path: > home > transcarter > public_html > > > > wp-content > plugins > leadin > scripts > utils


Operation   : Linux host59.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Software     : Apache
Server IP    : 198.54.126.42 | Your IP: 216.73.216.135
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/transcarter/public_html////wp-content/plugins/leadin/scripts/utils

NameTypeSizeLast ModifiedActions
appUtils.ts File 296 bytes July 17 2025 21:06:25.
backgroundAppUtils.ts File 1305 bytes July 17 2025 21:06:25.
contentEmbedInstaller.ts File 743 bytes July 17 2025 21:06:25.
iframe.ts File 1011 bytes July 17 2025 21:06:25.
isRefreshTokenAvailable.ts File 155 bytes July 17 2025 21:06:25.
queryParams.ts File 413 bytes July 17 2025 21:06:25.
withMetaData.ts File 802 bytes July 17 2025 21:06:25.

Reading File: /home/transcarter/public_html////wp-content/plugins/leadin/scripts/utils/iframe.ts

import { useEffect, useState } from 'react';

const IFRAME_DISPLAY_TIMEOUT = 5000;

export function useIframeNotRendered(app: string) {
  const [iframeNotRendered, setIframeNotRendered] = useState(false);
  useEffect(() => {
    const timer = setTimeout(() => {
      const iframe = document.getElementById(app);
      if (!iframe) {
        setIframeNotRendered(true);
      }
    }, IFRAME_DISPLAY_TIMEOUT);

    return () => {
      if (timer) {
        clearTimeout(timer);
      }
    };
  }, []);

  return iframeNotRendered;
}

export const resizeWindow = () => {
  const adminMenuWrap = document.getElementById('adminmenuwrap');
  const sideMenuHeight = adminMenuWrap ? adminMenuWrap.offsetHeight : 0;
  const adminBar = document.getElementById('wpadminbar');
  const adminBarHeight = (adminBar && adminBar.offsetHeight) || 0;
  const offset = 4;
  if (window.innerHeight < sideMenuHeight) {
    return sideMenuHeight - offset;
  } else {
    return window.innerHeight - adminBarHeight - offset;
  }
};

SILENT KILLER Tool