diff -u b/admin_menu_navbar.module b/admin_menu_navbar.module --- b/admin_menu_navbar.module +++ b/admin_menu_navbar.module @@ -47,7 +47,41 @@ unset($page['page_bottom']['admin_menu']); } } +/** + * Implements hook_css_alter(). + */ +function admin_menu_navbar_css_alter(&$css) { + $detect = mobile_detect_get_object(); + $is_mobile = $detect->isMobile(); + // Get the path to the module + + if (!$is_mobile) { + $path = drupal_get_path('module', 'navbar'); + unset($css[$path . '/css/navbar.menu.css']); + } + else { + $path = drupal_get_path('module', 'admin_menu'); + + // Remove the unneeded files from the css array + unset($css[$path . '/admin_menu.css']); + unset($css[$path . '/admin_menu.uid1.css']); + } +} + +/** + * Implements hook_js_alter(). + */ +function admin_menu_navbar_js_alter(&$js) { + $detect = mobile_detect_get_object(); + $is_mobile = $detect->isMobile(); + + // Get the path to the module + if ($is_mobile) { + $path = drupal_get_path('module', 'admin_menu'); + unset($js[$path . '/admin_menu.js']); + } +} /** * Implements hook_help(). */