REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 711 B
Close
/home/nshryvcy/radiantskinclinics.org/wp-content/plugins/extendify_old/src/AutoLaunch/hooks/useRateLimitedCursor.js
Text
Base64
import { useEffect, useRef } from '@wordpress/element'; export const useRateLimitedCursor = (cb, intervalMs = 2000, deps = []) => { const lastAtRef = useRef(0); const timerRef = useRef(null); useEffect(() => { const schedule = () => { clearTimeout(timerRef.current); const now = Date.now(); const wait = Math.max(0, lastAtRef.current + intervalMs - now); const run = () => { lastAtRef.current = Date.now(); const hasMore = cb(); if (hasMore) schedule(); }; if (wait === 0) run(); else timerRef.current = setTimeout(run, wait); }; schedule(); return () => { clearTimeout(timerRef.current); timerRef.current = null; }; }, [cb, intervalMs, ...deps]); };
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
useCreateSite.js
17.31 KB
lrw-r--r--
2026-04-27 23:36:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useInstallRequiredPlugins.js
948 B
lrw-r--r--
2026-04-27 23:36:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useRateLimitedCursor.js
711 B
lrw-r--r--
2026-02-27 04:48:52
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
useWarnOnLeave.js
533 B
lrw-r--r--
2026-02-27 04:48:52
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).