document.addEventListener("DOMContentLoaded", ready); function ready() { location.hash && window.onhashchange(); }