mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 14:00:21 +00:00
Improve a bit window loading on init
This commit is contained in:
parent
1fc2051c1d
commit
a392b9f35f
2 changed files with 8 additions and 3 deletions
|
@ -64,8 +64,7 @@ function openCorrectChannel(clientActive, serverActive) {
|
||||||
|
|
||||||
// Open window provided in location.hash
|
// Open window provided in location.hash
|
||||||
if (target.length === 0 && window.location.hash) {
|
if (target.length === 0 && window.location.hash) {
|
||||||
target = $("#footer, #sidebar, #help")
|
target = $(`[data-target="${escape(window.location.hash)}"]`).first();
|
||||||
.find(`[data-target="${escape(window.location.hash)}"]`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open last active channel according to the server
|
// Open last active channel according to the server
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
{{#each channels}}
|
{{#each channels}}
|
||||||
<div id="chan-{{id}}" data-title="{{name}}" data-id="{{id}}" data-type="{{type}}" data-target="#chan-{{id}}" class="chan {{type}}">
|
<div
|
||||||
|
id="chan-{{id}}"
|
||||||
|
class="chan {{type}}"
|
||||||
|
data-id="{{id}}"
|
||||||
|
data-title="{{name}}"
|
||||||
|
data-type="{{type}}"
|
||||||
|
>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<button class="lt" aria-label="Toggle channel list"></button>
|
<button class="lt" aria-label="Toggle channel list"></button>
|
||||||
{{#equal type "channel"}}
|
{{#equal type "channel"}}
|
||||||
|
|
Loading…
Reference in a new issue