Updated savepublishing.js