window[location.hash.substring(1, location.hash.length)];
doesn't call a function.
If you want to call the function whose name is location.hash.substring(1, location.hash.length)
, you may do
window[location.hash.substring(1, location.hash.length)]();
Side note :
location.hash.substring(1, location.hash.length)
can be shortened in
location.hash.slice(1)