diff --git a/.gitignore b/.gitignore index 6f79a45981..5a210bb73e 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ npm-debug.log /play.pokemonshowdown.com/js/client-main.js /play.pokemonshowdown.com/js/client-core.js /play.pokemonshowdown.com/js/client-connection.js +/play.pokemonshowdown.com/js/miniedit.js /play.pokemonshowdown.com/ads.txt /pokemonshowdown.com/.well-known/ diff --git a/play.pokemonshowdown.com/src/client-main.ts b/play.pokemonshowdown.com/src/client-main.ts index 29e7da4a0a..cb2c9f9baa 100644 --- a/play.pokemonshowdown.com/src/client-main.ts +++ b/play.pokemonshowdown.com/src/client-main.ts @@ -999,7 +999,7 @@ const PS = new class extends PSModel { } this.room.autoDismissNotifications(); this.update(); - if (this.room.onParentEvent) this.room.onParentEvent('focus', undefined); + this.room.onParentEvent?.('focus', undefined); return true; } focusLeftRoom() { diff --git a/play.pokemonshowdown.com/src/miniedit.ts b/play.pokemonshowdown.com/src/miniedit.ts new file mode 100644 index 0000000000..c62e6f55fd --- /dev/null +++ b/play.pokemonshowdown.com/src/miniedit.ts @@ -0,0 +1,235 @@ +// MiniEdit: ContentEditable-based rich source editor + +// True WYSIWYG is really complex, and