Hacker News new | ask | show | jobs
by oscargeorge 2817 days ago
yep. you're 100% on the money. no wizardry here. Couple of extra features like ability to hash link, and external url open in new window. but that it
1 comments

https://github.com/oscarmorrison/md-page/blob/master/script....

Line 43 to 48, I am not entirely sure what that hashlink does. What is the setTimeout function for? Could you expand on that?

It's to make linking to headers work. Eg oscarmorridon.com/md-page#code

As the element doesn't exist at time of first load this is a work around to focus on id once content is rendered in html