This module allows site administrators to easily inject custom CSS and JavaScript into a Drupal site without modifying theme files. It's useful for making quick tweaks or site-specific adjustments, and can be configured for export and use across multiple sites. An optional submodule also provides GDPR compliance by allowing JavaScript to be blocked until user consent is given.
This combines the two modules, JS Injector and CSS Injector, into a single module for simplicity.
As described from those modules, this functions the same. This module is definitely not a replacement for full-fledged theming, but it provides site administrators with a quick and easy way of tweaking things without diving into full-fledged theme hacking.
CSS Injector
Allows administrators to inject CSS into the page output based on configurable rules. It's useful for adding simple CSS tweaks without modifying a site's official theme.
JS Injector
Allows administrators to inject JS into the page output based on configurable rules. It's useful for adding simple JS tweaks without modifying a site's official theme.
These configurations uses Drupal 8 Entity API and therefore all configurations are held in the database. This means they are exportable using features or custom module installs using yml files.
This is great for multi-site installations where each site may have a few minor differences. It is sometimes easiest to allow for single site configurations.
Overrides
This module does currently not work well with asset overrides, be it in settings.php, from the language system or contrib modules. You can help in #2870153: Work well with overrides to fix that.
GDPR-Compliance:
The COOKiES Asset Injector submodule provides the additional option to block Asset Injector JavaScript, until consent is given.
Ask your assistant about Asset Injector
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.