You are here

function addtocopy_library in Add link to copied text 7

Implements hook_library().

File

./addtocopy.module, line 36

Code

function addtocopy_library() {
  $libraries['addtocopy'] = array(
    'title' => 'Add to Copy',
    'website' => 'http://tops.net.ua/jquery_addtocopy/',
    'version' => _addtocopy_library_version(),
    'js' => array(
      drupal_get_path('module', 'addtocopy') . '/addtocopy.js' => array(),
      array(
        'type' => 'setting',
        'data' => array(
          'addtocopy' => array(
            'selector' => variable_get('addtocopy_selector', '#content'),
            'minlen' => variable_get('addtocopy_minlen', 25),
            'htmlcopytxt' => variable_get('addtocopy_htmlcopytxt', '<br>More: <a href="[link]">[link]</a><br>'),
            'addcopyfirst' => variable_get('addtocopy_addcopyfirst', 0),
          ),
        ),
      ),
    ),
    'css' => array(
      drupal_get_path('module', 'addtocopy') . '/addtocopy.css' => array(
        'type' => 'file',
      ),
    ),
  );
  if (module_exists('libraries')) {
    $libraries['addtocopy']['js'][libraries_get_path('addtocopy') . '/addtocopy.js'] = array();
  }
  else {
    $libraries['addtocopy']['js']['sites/all/libraries/addtocopy' . '/addtocopy.js'] = array();
  }
  return $libraries;
}