writer javascript update