From 9299f79bab6072fc8d93a3ffedb2c95743f8c556 Mon Sep 17 00:00:00 2001
From: Simon Ser <contact@emersion.fr>
Date: Sun, 19 Jan 2025 21:11:58 +0100
Subject: [PATCH] Make debug=0 URL param disable debug logs

---
 components/app.js | 2 ++
 doc/url-params.md | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/components/app.js b/components/app.js
index d045559..3c86f41 100644
--- a/components/app.js
+++ b/components/app.js
@@ -323,6 +323,8 @@ export default class App extends Component {
 		}
 		if (queryParams.debug === "1") {
 			this.debug = true;
+		} else if (queryParams.debug === "0") {
+			this.debug = false;
 		}
 
 		if (window.location.hash) {
diff --git a/doc/url-params.md b/doc/url-params.md
index 58419f5..3a497f6 100644
--- a/doc/url-params.md
+++ b/doc/url-params.md
@@ -7,7 +7,7 @@ gamja settings can be overridden using URL query parameters:
   replaced with a randomly generated value)
 - `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
+- `debug`: enable debug logs if set to `1`, disable debug logs if set to `0`
 
 Alternatively, the channels can be set with the URL fragment (ie, by just
 appending the channel name to the gamja URL).