replace order coffee sript with javascript