added navbar inject function to viewer