hot swapping javascript files... the hard way