Extensions in Two Accounts web

What are Extensions?

Extensions allow you to inject custom JavaScript code into specific pages or across your entire Two Accounts web application. This powerful feature enables advanced customization and functionality enhancements.

Key Features:

  • Custom JavaScript Injection: Modify page elements, add new functionality, or automate tasks
  • URL Targeting: Apply to specific pages or site-wide
  • Admin Control: Only administrators can create and manage extensions
  • Easy Management: Enable/disable extensions as needed

How to Create an Extension

  1. Navigate to Settings > PDF | Themes | Extensions > Extensions
  2. Click New Extension
  3. Enter a descriptive name for your extension
  4. Add your JavaScript code
  5. Set the target location:
    • Custom URL: For specific pages (e.g., "sales-invoices")
    • Everywhere: Applies to all pages
  6. Click Create to save your extension

Example Extension

Below is a simple JavaScript example that alerts the current page URL:

// This extension will show the current URL in an alert var url = window.location.pathname; alert("Current URL: " + url);
Note: Only administrator accounts can create and manage extensions. You can edit, disable, or delete extensions at any time from the Extensions management page.