Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion play.pokemonshowdown.com/src/panel-mainmenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export class MainMenuRoom extends PSRoom {
room.update(null);
}
}
PS.alert(message.replace(/\|\|/g, '\n'));
PS.alert(message.replace(/^(\|modal\||\|html\||\|wide\|)/, "").replace(/\|\|/g, '\n'));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these not be handled inside PS.alert?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can if we want
but i think its better that we keep this outside PS.alert
those prefixes are protocol stuff so handling them outside of the function keeps PS.alert simple, as it is just a helper function to show the given message in a popup.

return;
}
}
Expand Down