Updated load-posts javascript