You are here

function highlight_page_build in Highlight 7

File

./highlight.module, line 75

Code

function highlight_page_build(&$page) {
  drupal_add_js(array(
    'highlight' => array(
      'area' => variable_get('highlight_area', 'body'),
    ),
  ), 'setting');
  drupal_add_js(array(
    'highlight' => array(
      'class' => variable_get('highlight_class', 'highlight'),
    ),
  ), 'setting');
  drupal_add_js(array(
    'highlight' => array(
      'color' => variable_get('highlight_color', 'yellow'),
    ),
  ), 'setting');
  drupal_add_js(array(
    'highlight' => array(
      'textColor' => variable_get('highlight_text_color', 'black'),
    ),
  ), 'setting');
  drupal_add_js(array(
    'highlight' => array(
      'wordsonly' => variable_get('highlight_wordsonly', TRUE),
    ),
  ), 'setting');
  drupal_add_js(array(
    'highlight' => array(
      'patterns' => variable_get('highlight_patterns', ''),
    ),
  ), 'setting');
  drupal_add_js(array(
    'highlight' => array(
      'referrerPatterns' => variable_get('highlight_patterns_referrer', ''),
    ),
  ), 'setting');
  drupal_add_js(array(
    'highlight' => array(
      'stopwords' => str_replace(' ', '', variable_get('highlight_stopwords', '')),
    ),
  ), 'setting');
  drupal_add_js(drupal_get_path('module', 'highlight') . '/js/jquery.highlight.js');
  drupal_add_js(drupal_get_path('module', 'highlight') . '/js/highlight.js', array(
    'scope' => 'footer',
  ));
}