You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
428 B

9 years ago
<script>
var prefix = /^\/components/.test(location.pathname) ? location.pathname.replace(/^\//, '').split('/').join('-') : '';
9 years ago
var scrollToString = location.hash ? '?scrollTo=' + prefix + location.hash : '';
if (location.pathname === '/changelog') {
9 years ago
location.href = '/#/docs/react/changelog' + scrollToString;
} else {
9 years ago
location.href = '/#' + location.pathname.replace(/\/$/, '') + scrollToString;
}
9 years ago
</script>