You are here

function context_breakpoint_process_html in Context Breakpoint 7

Implements hook_js_alter().

File

./context_breakpoint.module, line 201
context_screenresolution.module Main module file.

Code

function context_breakpoint_process_html(&$vars) {

  // Add initialization code to the end of head to prevent loading the whole page
  // when the reload will be triggered anyway.
  // This needs to be done here, because drupal_add_js does not allow adding
  // something after the settings.
  //
  // See #1866322.
  $output = array(
    '#type' => 'markup',
    '#markup' => '<script type="text/javascript">Drupal.behaviors.contextBreakpoint.preInit();</script>' . "\n",
  );
  $vars['scripts'] .= drupal_render($output);
}