Skip to content
Snippets Groups Projects
Select Git revision
  • 3232173-add-a-notes
  • 8.x-2.x default
  • unit-tests
  • 2915289-conditions-plugins
  • 8.x-1.x
  • 8.x-1.0-beta
  • 8.x-2.20
  • 8.x-2.19
  • 8.x-2.18
  • 8.x-2.17
  • 8.x-2.16
  • 8.x-2.15
  • 8.x-2.14
  • 8.x-2.13
  • 8.x-2.12
  • 8.x-2.11
  • 8.x-2.10
  • 8.x-2.9
  • 8.x-2.8
  • 8.x-2.7
  • 8.x-2.6
  • 8.x-2.5
  • 8.x-2.4
  • 8.x-2.3
  • 8.x-2.2
  • 8.x-2.1
26 results

asset_injector-3232173

  • Clone with SSH
  • Clone with HTTPS
  • INTRODUCTION

    This combines the two modules, CSS Injector and JS 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.

    REQUIREMENTS

    This module has no requirements.

    INSTALLATION

    Install as you would normally install a contributed Drupal module. See: https://drupal.org/documentation/install/modules-themes/modules-8 for further information.

    CONFIGURATION

    1. Configure user permissions in Administration » People » Permissions:
      • Administer CSS Assets Add and configure css injector configurations
      • Administer JS Assets Add and configure js injector configurations. Give to trusted roles only.
    2. Add JS and CSS Assets in Administration » Configuration » Development » Asset Injector Choose the desired asset to be injected and click to add a new. Upon saving a new asset or editing an existing asset, caches will automatically be flushed. This may result in a slowly loading page after submitting the form.