move javascript to static file