Disable Save option when a switch is on (Visustella Main Menu Core)

As the title states, how would I go about toggling the save option off if a certain switch is turned on?
Go into Plugin Manager -> VS Main Menu -> Command Window List -> Save -> JS: Enable, and type

Code:
return this.isSaveEnabled() && !$gameSwitches.value(42)

Replace 42 with your Switch Id.
Go into Plugin Manager -> VS Main Menu -> Command Window List -> Save -> JS: Enable, and type

Code:
return this.isSaveEnabled() && !$gameSwitches.value(42)

Replace 42 with your Switch Id.
Thanks, it worked like a charm.

Original thread: https://forums.rpgmakerweb.com/threads/disable-save-option-when-a-switch-is-on-visustella-main-menu-core.166474/