REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.29 KB
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/extendify_old/src/Agent/buttons.js
Text
Base64
import { AdminBar } from '@agent/components/buttons/AdminBar'; import { Mobile } from '@agent/components/buttons/Mobile'; import { PostEditor } from '@agent/components/buttons/PostEditor'; import { render } from '@shared/lib/dom'; import { isOnLaunch } from '@shared/lib/utils'; import domReady from '@wordpress/dom-ready'; import { useEffect } from '@wordpress/element'; import { registerPlugin } from '@wordpress/plugins'; // TODO: Sometimes the admin bar is crowded, so a smarter way would be to do some analysis first and position these accordingly. // Global toolbar domReady(() => { if (isOnLaunch()) return; const id = 'wp-admin-bar-extendify-agent-btn'; if (document.getElementById(id)) return; const agent = Object.assign(document.createElement('li'), { className: 'extendify-agent', id, }); agent.style.height = '1.75rem'; agent.style.marginInlineEnd = '4px'; // TODO: If we want to allow swapping live we need to rethink this const loc = window.extAgentData.agentPosition === 'floating' ? '#wp-admin-bar-my-account' : '#wp-admin-bar-wp-logo'; document.querySelector(loc)?.before(agent); render(<AdminBar />, agent); }); // Mobile domReady(() => { if (isOnLaunch()) return; const id = 'extendify-agent-mobile-btn'; if (document.getElementById(id)) return; const agent = Object.assign(document.createElement('div'), { className: 'extendify-agent', id, }); agent.style.position = 'sticky'; agent.style.top = 'calc(100% - var(--extendify-agent-mobile-btn-height))'; agent.style.bottom = '0'; agent.style.zIndex = '99999'; document.body.appendChild(agent); render(<Mobile />, agent); }); // In editor registerPlugin('extendify-agent-buttons', { render: () => <AgentButton />, }); const AgentButton = () => { useEffect(() => { if (isOnLaunch()) return; const id = 'extendify-agent-editor-btn'; if (document.getElementById(id)) return; const agent = Object.assign(document.createElement('span'), { className: 'extendify-agent', id, }); setTimeout(() => { if (document.getElementById(id)) return; const page = '[aria-controls="edit-post:document"]'; const fse = '[aria-controls="edit-site:template"]'; document.querySelector(page)?.after(agent); document.querySelector(fse)?.after(agent); render(<PostEditor />, agent); }, 300); }, []); return null; };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 6 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
components
DIR
-
drwxr-xr-x
2026-04-28 02:40:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
hooks
DIR
-
drwxr-xr-x
2026-04-28 02:40:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
lib
DIR
-
drwxr-xr-x
2026-04-28 02:40:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
state
DIR
-
drwxr-xr-x
2026-04-28 02:40:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
tours
DIR
-
drwxr-xr-x
2026-04-28 02:40:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
workflows
DIR
-
drwxr-xr-x
2026-04-28 02:40:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
agent.css
3.80 KB
lrw-r--r--
2026-03-19 23:35:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
agent.js
1.29 KB
lrw-r--r--
2026-03-19 23:35:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Agent.jsx
17.40 KB
lrw-r--r--
2026-03-19 23:35:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
api.js
4.82 KB
lrw-r--r--
2026-03-05 22:57:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
buttons.js
2.29 KB
lrw-r--r--
2026-03-19 23:35:18
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Chat.jsx
2.42 KB
lrw-r--r--
2026-03-05 22:57:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
icons.jsx
6.92 KB
lrw-r--r--
2026-02-19 03:27:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).