rewrite navbar js