I am using below code in my custom module "my_module".
function my_module_theme(){
return array(
'my_module_javascript'=>array('arguments'=>array(),),
);
}
function my_module_init(){
theme('my_module_javascript');
}
function theme_my_module_javascript(){
drupal_add_js(drupal_get_path('module','my_module').'/my_module.js');
}
After I enable the module page source is showing the javascript file without .js extension. like src="modulepath/my_module?lrmjns" Am I doing anything wrong? why is it skipping .js?