Disable debug logs in production

console.debug logs cause some performance issues because the browser
is forced to save the logged objects just in case the user opens the
debugging tools.

They can be force-enabled back by adding ?debug=1 to the URL.

Only console.debug is disabled, console.log and other levels are a lot
less verbose and still enabled by default.
This commit is contained in:
Simon Ser 2021-12-01 11:40:59 +01:00
parent 07c9cdebb6
commit 93ba0e6443
3 changed files with 23 additions and 2 deletions

View file

@ -84,6 +84,7 @@ gamja settings can be overridden using URL query parameters:
- `nick`: nickname
- `channels`: comma-separated list of channels to join (`#` needs to be escaped)
- `open`: [IRC URL] to open
- `debug`: if set to 1, debug mode is enabled
Alternatively, the channels can be set with the URL fragment (ie, by just
appending the channel name to the gamja URL).