diff options
author | Hubert Argasinski <argasinski.hubert@gmail.com> | 2016-10-07 21:10:19 -0400 |
---|---|---|
committer | Hubert Argasinski <argasinski.hubert@gmail.com> | 2016-10-07 21:10:19 -0400 |
commit | 98dced30cece0f58e2fb7e3009396b0b35a5ee73 (patch) | |
tree | 66e7c7ed70216d8ac7e8e26e85c2064be91774fd /support/jsdoc | |
parent | f71da34695ab46a5b9605c496532f33db49b2069 (diff) | |
download | async-98dced30cece0f58e2fb7e3009396b0b35a5ee73.tar.gz |
docs: update old id links to new ones
Diffstat (limited to 'support/jsdoc')
-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(); }); |