You are here

function navbar_js_alter in Navbar 7

Implements hook_js_alter().

File

./navbar.module, line 810
Administration navbar for quick access to top level administration items.

Code

function navbar_js_alter(&$javascript) {

  // Only load the tableheader offset script if the core tableheader script
  // and the navbar js itself is loaded.
  if (isset($javascript['misc/tableheader.js']) && isset($javascript[drupal_get_path('module', 'navbar') . '/js/navbar.js'])) {
    drupal_add_js(array(
      'tableHeaderOffset' => 'Drupal.navbar.height',
    ), array(
      'type' => 'setting',
    ));
  }
}