[NF] Move javascript to js file.