MV Remove "select target" for items and spells if scope is "The User"

Hello,
I have items that apply states to the user. So, their scope is "THE USER". However, when the player selects them, they are still required to select the user as target, even though the user is the only available selection. That's unnecessary and redundant.
Is there an easy way to fix this through Javascript? I don't mean to completely remove it, only when it's not necessary. Meaning, when the scope is "the user" or "all allies".
Also, is it possible to directly leave the menu after using an item, instead of having to cancel out of it?
I don't have MZ, but this works with MV so I guess you'll be able to apply it in MZ
Code:
Scene_ItemBase.prototype.determineItem = function() {
    var action = new Game_Action(this.user());
    var item = this.item();
    action.setItemObject(item);
    if (action.isForFriend()) {
        if (item.scope === 11){
            this.showSubWindow(this._actorWindow);
            this._actorWindow.selectForItem(this.item());
            this.useItem();
            this.hideSubWindow(this._actorWindow);
        }
        else {
            this.showSubWindow(this._actorWindow);
            this._actorWindow.selectForItem(this.item());
        }
    } else {
        this.useItem();
        this.activateItemWindow();
    }
};
I don't have MZ, but this works with MV so I guess you'll be able to apply it in MZ

Hello Soulrender, I'm sorry, I should have specified. I need it for MV.
Your code works like a charm, thank you.
One question, do you also know how to make the menu close automatically when the item is used, so I don't have to hit ESC twice to close the inventory and the pause menu?
try at the end of code where is if (item.scope === 11) put SceneManager.push(Scene_Map)
try at the end of code where is if (item.scope === 11) put SceneManager.push(Scene_Map)

It works. You're awesome. Thank you so much!
I was wondering if this could be done for Skills that targets only the User too? ♥

Original thread: https://forums.rpgmakerweb.com/threads/remove-select-target-for-items-and-spells-if-scope-is-the-user.125736/