You are here

function elfinder_browser_js in elFinder file manager 7

Same name and namespace in other branches
  1. 7.3 elfinder.module \elfinder_browser_js()
  2. 7.2 elfinder.module \elfinder_browser_js()

Removing unwanted js

1 call to elfinder_browser_js()
elfinder-page.tpl.php in tpl/elfinder-page.tpl.php
elFinder file browser page template Copyright (c) 2010, Alexey Sukhotin

File

./elfinder.module, line 786

Code

function elfinder_browser_js() {
  $js = drupal_add_js(NULL, array(
    'scope' => 'header',
  ));
  if (module_exists('admin_menu')) {
    $apath = drupal_get_path('module', 'admin_menu');
    $atpath = drupal_get_path('module', 'admin_menu_toolbar');
    $rms[] = isset($apath) ? $apath : '';
    $rms[] = isset($atpath) ? $atpath : '';
    foreach (array_keys($js) as $k) {
      foreach ($rms as $rm) {
        if (preg_match('|' . $rm . '|', $k) && $rm != '') {
          unset($js[$k]);
        }
      }
    }
  }
  return drupal_get_js('header', $js);
}