Dynamically update and display current unit

Update and display the current unit based on the current URL.
The fragment identifier in the URL is used to decide the current
unit to be displayed.