Moved the long JavaScript code to www/js/post.js