Move javascript to frontend

Signed-off-by: Gary Smith <bk@kc.gs>