update origin js code