Use Context to load JavaScript on certain pages Is it possible to load a JavaScript file on certain pages with the Context module?
The Context Add Assets module does exactly that :)

Taken from the README


  Supports adding active theme files to page via context


I've used 7.x-1.0-beta1 with no major problems, so don't be afraid that there's no full release :)