mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-14 19:05:01 -05:00
Read auto-join channels from browser URL hash
This is easier to type than trying to escape the # in ?channels=#XXX.
This commit is contained in:
parent
7c81fa6e8c
commit
17cd38f0b9
1 changed files with 4 additions and 0 deletions
|
@ -252,6 +252,10 @@ export default class App extends Component {
|
|||
connectParams.autojoin = queryParams.channels.split(",");
|
||||
}
|
||||
|
||||
if (window.location.hash) {
|
||||
connectParams.autojoin = window.location.hash.split(",");
|
||||
}
|
||||
|
||||
this.setState((state) => {
|
||||
return { connectParams: { ...state.connectParams, ...connectParams } };
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue