Set up home page JS directive