JS tool to work with URL hash