You are here

function respondjs_page_build in Respond.js 7

Implements hook_page_build().

This is the function that adds respond.js to the page.

File

./respondjs.module, line 48
Main file for the Respond.js module

Code

function respondjs_page_build() {

  // We need respond.js to load as soon in the HTML as possible, because it can
  // affect the presentation of a page. The options below ensure that it happens.
  drupal_add_js(respondjs_get_library_file(), array(
    'type' => 'file',
    'scope' => variable_get('respondjs_scope', RESPONDJS_SCOPE_DEFAULT),
    'group' => JS_LIBRARY,
    'every_page' => TRUE,
    'weight' => -999,
    'preprocess' => 0,
  ));
}