PluginProbe
Extendify / 3.1.4
Extendify v3.1.4
3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 0.7.0 All 126 releases
extendify / src / Agent / lib / util.js

util.js in Extendify 3.1.4, at src/Agent/lib/util.js

17 lines 537 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 export const clamp = (value, min, max) => Math.max(min, Math.min(value, max));
2
3 export const makeId = () =>
4 Date.now().toString(36) + Math.random().toString(36).slice(2);
5
6 export const isInEditor = () => {
7 const path = window.location.pathname;
8 const params = new URLSearchParams(window.location.search);
9 return path.includes('/wp-admin/post.php') && params.get('action') === 'edit';
10 };
11
12 export const isChangeSiteDesignWorkflowAvailable = () => {
13 const { useAgentOnboarding } = window.extSharedData;
14
15 return useAgentOnboarding;
16 };
17