adds AJAX for posts and comments