[%- DEFAULT cats = [ 'Model', 'View', 'Role', 'Action', 'Feed' ]; %] function dispatchByAnchor () { var anchor = location.hash; anchor = anchor.replace(/^\#/, ''); if (savedAnchor == anchor) return; if (anchor == "") { anchor = 'models'; location.hash = 'models'; } var oldAnchor = savedAnchor; savedAnchor = anchor; // prevent memory leaks from dynamically created