diff options
-rw-r--r-- | support/jsdoc/jsdoc-custom.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/support/jsdoc/jsdoc-custom.js b/support/jsdoc/jsdoc-custom.js index 0bce1fa..ee92203 100644 --- a/support/jsdoc/jsdoc-custom.js +++ b/support/jsdoc/jsdoc-custom.js @@ -102,4 +102,16 @@ $(function initSearchBar() { $('#main').animate({ scrollTop: $el.offsetTop - 60 }, 500); } }); + + function fixOldHash() { + var hash = window.location.hash; + if (hash) { + var hashMatches = hash.match(/^#\.(\w+)$/); + if (hashMatches) { + window.location.hash = '#'+hashMatches[1]; + } + } + } + + fixOldHash(); }); |