Skip to content

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

  1. In the site list, click "Manage Plugins".
  2. Create a plugin with name, version, notes, and associated site.
  3. Upload a plugin file or open plugin configuration.
  4. Add a script with name, matching URL, script type, selector, and content.
  5. Save and test the target site with a test account.
  6. Add scripts in account category, workspace, or internal site configuration pages for scenario-specific behavior.

Script Design Recommendations

ItemRecommendation
NamingUse site-purpose-version, such as crm-login-v1
Match URLMatch the login page or target path as precisely as possible
SelectorPrefer stable attributes, such as name, data-*, or clear IDs
Error HandlingTolerate missing elements, slow network, and secondary redirects
Version NotesRecord target site version, change reason, and test account

Release Process

  1. Write the script in a test plugin or test site.
  2. Execute the full login flow with a test account.
  3. Check the user portal, collaboration links, and workspaces.
  4. Export or record the plugin version.
  5. 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.

Sa2web 1.0.0