Scripts and Plugins
Goal
Write custom scripts for sites, account categories, workspaces, or internal sites, and use site plugins to extend login and page handling.
Prerequisites
- The target site or workspace exists.
- Your account has site configuration, plugin management, or internal site configuration permissions.
- You understand the target site's page structure and login flow.
Steps
- In the site list, click "Manage Plugins".
- Create a plugin with name, version, notes, and associated site.
- Upload a plugin file or open plugin configuration.
- Add a script with name, matching URL, script type, selector, and content.
- Save and test the target site with a test account.
- Add scripts in account category, workspace, or internal site configuration pages for scenario-specific behavior.
Script Design Recommendations
| Item | Recommendation |
|---|---|
| Naming | Use site-purpose-version, such as crm-login-v1 |
| Match URL | Match the login page or target path as precisely as possible |
| Selector | Prefer stable attributes, such as name, data-*, or clear IDs |
| Error Handling | Tolerate missing elements, slow network, and secondary redirects |
| Version Notes | Record target site version, change reason, and test account |
Release Process
- Write the script in a test plugin or test site.
- Execute the full login flow with a test account.
- Check the user portal, collaboration links, and workspaces.
- Export or record the plugin version.
- Publish to production and keep a rollback version.
Verification
- The new plugin appears in the plugin list.
- The plugin or script runs according to matching rules when visiting the target site.
- Login, navigation, data filling, or page enhancement behaves as expected.
- Slow target site loading or secondary authentication does not cause the script to freeze the page.
FAQ
- Page scripts are suitable for DOM, forms, and page behavior.
- SSE scripts are suitable for remote browser event logic.
- Validate plugin changes in a test environment before production use.