JS script order change