MZ Remove Cancel option from Select Item?

Is there a way to permanently remove the ability to cancel out of the Select Item menu?

I know you can loop it to force the player to select again if the variable is returned as 0, but my game uses Select Item a lot and it will be very tedious to put a whole loop in there every single time. It's also just plain awkward to have a big fat Cancel Arrow on the screen that occasionally displays in the wrong freaking place, so I would prefer for it to just be fully disabled.
Yeah, I think just empty these functions:

Window_EventItem.prototype.createCancelButton = function() {
};

Window_EventItem.prototype.onCancel = function() {
};
Yeah, I think just empty these functions:

Window_EventItem.prototype.createCancelButton = function() {
};

Window_EventItem.prototype.onCancel = function() {
};
I'm pretty new to the coding stuff. Where would I put that code? Is it a script call or something that needs to go in a plugin?
Copy paste to notepad, save as .js file in plugin folder and add as plugin.
Copy paste to notepad, save as .js file in plugin folder and add as plugin.
Aight, thanks!

Original thread: https://forums.rpgmakerweb.com/threads/remove-cancel-option-from-select-item.182552/