Remove unnecessary JS in Drupal


Drupal 6

function mytheme_preprocess_page(&$vars){
    $scripts = drupal_add_js();
    //PRINT THIS ARRAY AND UNSET THE UNWANTED ARRAY// 
    unset($scripts['module']['YOUR_PATH_TO_JS']);
    $vars['scripts']= drupal_get_js('header', $scripts);
}

Drupal 7

function mymodule_js_alter(&$javascript){
  $alias = drupal_get_path_alias($_GET['q']);
  if($alias =="my-page"){
    unset($javascript['sites/all/modules/mymodule/mymodule.js']);
  }
  unset($javascript['sites/all/modules/mymodule/mymodule.js']);
}
Advertisements

How To Make A Bootstrap Drupal Sub Theme


And of course you’ll want to style it up a little bit, here you have an easy method to modify and compile the theme’s .less files

http://incident57.com/less/video/tutorial.mov

Source : http://drupal.tutsurf.com/ http://incident57.com/less/