implemented the new feature and fix a js bug in batch publishing