keep refactor js code in block edit.