How to override javascript refresh function using custom app?

when we use refresh js function in custom app,system first execute custom app refresh even,then it execute erpnext ,so it making duplication

how can i replace erpnext js function using custom app