Remove unnecessary paths from js.