You are here

function like_and_dislike_init in Like & Dislike 7

Implementing hook_init()

Add the required javascript and CSS to the page

File

./like_and_dislike.module, line 14

Code

function like_and_dislike_init() {
  $module_path = drupal_get_path('module', 'like_and_dislike');
  drupal_add_js($module_path . "/assets/javascripts/LikeDislikeService.js");
  drupal_add_js($module_path . "/assets/javascripts/like_and_dislike.js");
  drupal_add_js("var like_and_dislike_path = '" . $module_path . "';", "inline");
}