pure javascript ajax pinning articles and voting