Previously when a url like /issues/1234#note-4 was visited it would be immediately replaced with /issues/1234?tab=history_all, and the page would not focus on the note.
This change checks if there is a note in the url fragment and if there is, displays the 'all' tab, scrolls to and highlights the note.
Also refactored the initTabs function to make it easier to add more tabs and to select tabs by id rather than id+journal class
Previously when a url like
/issues/1234#note-4
was visited it would be immediately replaced with/issues/1234?tab=history_all
, and the page would not focus on the note.This change checks if there is a note in the url fragment and if there is, displays the 'all' tab, scrolls to and highlights the note.
Also refactored the
initTabs
function to make it easier to add more tabs and to select tabs by id rather than id+journal class