UNPKG

@steambrew/client

Version:
13 lines (12 loc) 779 B
// import { fakeRenderComponent } from '../utils'; import { findModuleExport } from '../webpack'; export const showContextMenu = findModuleExport((e) => typeof e === 'function' && e.toString().includes('GetContextMenuManagerFromWindow(') && e.toString().includes('.CreateContextMenuInstance(')); export const Menu = findModuleExport((e) => e?.prototype?.HideIfSubmenu && e?.prototype?.HideMenu); export const MenuItem = findModuleExport((e) => e?.render?.toString()?.includes('bPlayAudio:') || (e?.prototype?.OnOKButton && e?.prototype?.OnMouseEnter)); /* all().map(m => { if (typeof m !== "object") return undefined; for (let prop in m) { if (m[prop]?.prototype?.OK && m[prop]?.prototype?.Cancel && m[prop]?.prototype?.render) return m[prop]} }).find(x => x) */