(targetId)
| 84 | } |
| 85 | |
| 86 | function showHashTarget(targetId) { |
| 87 | var hashTarget = document.getElementById(targetId); |
| 88 | // new target is hidden |
| 89 | if (hashTarget && hashTarget.offsetHeight === 0 && |
| 90 | hashTarget.parentNode.parentNode.classList.contains('display-none')) { |
| 91 | hashTarget.parentNode.parentNode.classList.remove('display-none'); |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | window.addEventListener('hashchange', function() { |
| 96 | showHashTarget(location.hash.substring(1)); |