Make window appear/disappear on map

Hello!
I'm trying to create a menu that can be opened when you talk with certain NPCs. The menu itself is looking good, but I'm having trouble with the "open on the map" part.
I'm currently using this code to make my menu appear, and it works:

var _Scene_Map_start = Scene_Map.prototype.start;
Scene_Map.prototype.start = function(){
_Scene_Map_start.call(this);
if($gameSwitches._data[1]){
this._conversationWindow = new Window_ConversationTopics(30, 100);
this.addWindow(this._conversationWindow)};
};

However it's not an ideal solution, for I have to reload the scene by teleporting to make my menu appear.
How can I reload scene_map with a script call? I know there's a way, but can't find the correct code. I already tried Scene_Map.refresh(), $gameMap.refresh(), SceneManager._scene._conversationWindow.refresh() and other assorted variations, but with no avail.

I also have another INCREDIBLY STUPID PROBLEM: I don't know how to make my menu disappear.
Please help. ;__;
Create an aliases to Scene_Map.update too, and add this:

Code:
if ($gameSwitches.value(1) && !this._conversationWindow.visible) {
  this._conversationWindow.show();
};

if (!$gameSwitches.value(1) && this._conversationWindow.visible) {
  this._conversationWindow.hide();
};

You could show and hide this window controlling it by a switch.
Add it to the map with no conditions and set the visibility to true and false to hide and unhide it.

So add to scene map start without the gameswitch needing to be active. Then inside your window class or in scene map update, check if the condition meets and set visibility.

I'd help in more detail but I'm on my mobile phone.
Edit: ninjad

Original thread: https://forums.rpgmakerweb.com/threads/make-window-appear-disappear-on-map.79730/