Extracts navbar into javascript file for all pages