function search_krumo_js_alter in Search Krumo 7
Implements hook_js_alter().
With this function we check if there is a krumo present. If there is we can leave our own Javascript, otherwise our Javascript is not needed either.
File
- ./
search_krumo.module, line 42 - Code for the Search Krumo module.
Code
function search_krumo_js_alter(&$javascript) {
// This is the path for the Devel krumo Javascript.
$devel_js_path = drupal_get_path('module', 'devel') . '/devel_krumo_path.js';
// When Devel krumo Javascript is not present, remove Search Krumo Javascript.
if (!isset($javascript[$devel_js_path])) {
unset($javascript[drupal_get_path('module', 'search_krumo') . '/search_krumo.search.js']);
unset($javascript[drupal_get_path('module', 'search_krumo') . '/search_krumo.trail.js']);
}
}