mirror of
https://codeberg.org/emersion/gamja
synced 2025-03-13 07:48:37 +01: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
@ -252,6 +252,10 @@ export default class App extends Component {
|
|||||||
connectParams.autojoin = queryParams.channels.split(",");
|
connectParams.autojoin = queryParams.channels.split(",");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (window.location.hash) {
|
||||||
|
connectParams.autojoin = window.location.hash.split(",");
|
||||||
|
}
|
||||||
|
|
||||||
this.setState((state) => {
|
this.setState((state) => {
|
||||||
return { connectParams: { ...state.connectParams, ...connectParams } };
|
return { connectParams: { ...state.connectParams, ...connectParams } };
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user