You are here

function spamspan_init in SpamSpan filter 6

Implementation of hook_init().

File

./spamspan.module, line 125
This module implements the spamspan technique (http://www.spamspan.com ) for hiding email addresses from spambots.

Code

function spamspan_init() {

  // Add the javascript to each page
  drupal_add_js(drupal_get_path("module", "spamspan") . '/spamspan.compressed.js');

  // pass necessary variables to the javascript
  drupal_add_js(array(
    'spamspan' => array(
      'm' => 'spamspan',
      'u' => variable_get('spamspan_userclass', 'u'),
      'd' => variable_get('spamspan_domainclass', 'd'),
      'h' => 'h',
      't' => variable_get('spamspan_anchorclass', 't'),
    ),
  ), 'setting');
}