diff --git a/README.md b/README.md index ac1ecc8..91dbbbb 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,11 @@ This will start a development HTTP server for gamja. Connect to it and append gamja settings can be overridden using URL query parameters: - `server`: path or URL to the WebSocket server -- `channels`: comma-separated list of channels to join +- `nick`: nickname +- `channels`: comma-separated list of channels to join (`#` needs to be escaped) + +Alternatively, the channels can be set with the URL fragment (ie, by just +appending the channel name to the gamja URL). ## Configuration file diff --git a/components/app.js b/components/app.js index 03830ef..bee821f 100644 --- a/components/app.js +++ b/components/app.js @@ -253,6 +253,9 @@ export default class App extends Component { connectParams.serverURL = queryParams.server; } } + if (queryParams.nick) { + connectParams.nick = queryParams.nick; + } if (queryParams.channels) { connectParams.autojoin = queryParams.channels.split(","); }