Adding sitewide JS file in module I have a module that will provide a dropdown when creating a new block. Selecting either none, option 1 or option 2 will add a corresponding class to that block. That class will be targeted by a small (>4kb) jquery file. The file needs to be able to access every page since blocks can be put anywhere on the site.

I have seen multiple methods of adding JS files to websites, including editing the theme .info file. What is the best way to accomplish what I am trying to do? If the info file is the best way to go, is there a way to programmatically add the JS file to the info file?
You can add the file to a theme's or module's .info file using scripts[]:

scripts[] = js/my-script.js


The path should be relative to your module root.

See also Writing theme .info files and Writing module .info files.