You are here

function tacjs_log_page_attachments in TacJS 8.6

Implements hook_page_attachments().

Insert JavaScript to the appropriate scope/region of the page.

File

tacjs_log/tacjs_log.module, line 15
The main file for the TacJS Log module.

Code

function tacjs_log_page_attachments(&$page) {
  if (!\Drupal::service('router.admin_context')
    ->isAdminRoute()) {
    $page['#attached']['library'][] = 'tacjs_log/log';
  }
}