Better way of loading action specific javascript