How to override List view?

I have written my custom js for (item_list.js) .
But it’s not working properly. Sometimes it shows default view.