Override Community Module JS Files

Public

Overriding JS files of Modules in an Update Save way

</> CopyGet raw version
php
  1. /* Create a module and add this code in your .module file
  2.  */
  3.  
  4. function {module_name}_js_alter(&$javascript) {
  5. $file = drupal_get_path('module', '{module_name}') . '/{file_name}.js';
  6. $javascript['sites/all/modules/{module_name}/{file_name}.js'] = drupal_js_defaults($file);
  7. }