Back to marketplace
144

Add Extra JS

Buy now

Module to add extra JavaScript code to HumHub frontend pages.

Tip! Try this module in our demo hosting.

Buy now

Overview

The Add Extra JS module allows administrators to inject custom JavaScript code into the HumHub layout and feed. This enables additional customization without modifying core files.

Features

  • Inject JavaScript into the layout and feed.
  • Supports multi-language translations using Yii::t().
  • Secure and optimized execution of custom scripts.
  • Configurable via the HumHub administration panel.

Installation

  1. Upload the module to the protected/modules/add-extra-js directory.
  2. Enable the module in Admin Panel > Modules.
  3. Configure the JavaScript injection settings in Admin Panel > Module Configuration.

Usage

  1. Navigate to Admin Panel > Add Extra JS.
  2. Enter JavaScript code for:
    • Layout: Runs globally across the site.
    • Feed: Executes within the content feed.
  3. Click Save to apply changes.

Translations

  • The module supports multiple languages.
  • Translations are stored in messages/{language}/base.php.
  • To add a new language, create a folder messages/{new-lang}/ and define translations in base.php.

License

This module is licensed under the AGPL-3.0-or-later. See the LICENSE file for more details.

Roadmap

  • Allow administrators to inject JavaScript into specific sections beyond layout and feed, such as profile pages or dashboard.
  • Enable different JavaScript scripts for specific user roles or groups.
  • Implement stricter sanitization rules and an optional admin approval system for scripts.
  • Add a feature to test JavaScript before saving changes.
  • Provide options to export and import JavaScript configurations for easier migration.
  • Allow scripts to be loaded asynchronously to improve performance.

For feedback and contributions, visit the HumHub community forums.

Module Information

Price:
10 €
Latest version release:
1.1.0 - March 18, 2025
Publisher:
Author(s):
Website:
Compatibility:
HumHub 1.16 - 1.17