mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 04:23:13 +00:00
Merge pull request #1309 from thelounge/astorije/collapse-previews
Add collapse/expand commands to toggle all previews
This commit is contained in:
commit
2d853f20aa
3 changed files with 36 additions and 0 deletions
|
@ -590,6 +590,18 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="help-item">
|
||||||
|
<div class="subject">
|
||||||
|
<code>/collapse</code>
|
||||||
|
</div>
|
||||||
|
<div class="description">
|
||||||
|
<p>
|
||||||
|
Collapse all previews in the current channel (opposite of
|
||||||
|
<code>/expand</code>)
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="help-item">
|
<div class="help-item">
|
||||||
<div class="subject">
|
<div class="subject">
|
||||||
<code>/connect host [port]</code>
|
<code>/connect host [port]</code>
|
||||||
|
@ -653,6 +665,18 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="help-item">
|
||||||
|
<div class="subject">
|
||||||
|
<code>/expand</code>
|
||||||
|
</div>
|
||||||
|
<div class="description">
|
||||||
|
<p>
|
||||||
|
Expand all previews in the current channel (opposite of
|
||||||
|
<code>/collapse</code>)
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="help-item">
|
<div class="help-item">
|
||||||
<div class="subject">
|
<div class="subject">
|
||||||
<code>/invite nick [channel]</code>
|
<code>/invite nick [channel]</code>
|
||||||
|
|
|
@ -25,11 +25,13 @@ const commands = [
|
||||||
"/ban",
|
"/ban",
|
||||||
"/banlist",
|
"/banlist",
|
||||||
"/close",
|
"/close",
|
||||||
|
"/collapse",
|
||||||
"/connect",
|
"/connect",
|
||||||
"/ctcp",
|
"/ctcp",
|
||||||
"/deop",
|
"/deop",
|
||||||
"/devoice",
|
"/devoice",
|
||||||
"/disconnect",
|
"/disconnect",
|
||||||
|
"/expand",
|
||||||
"/invite",
|
"/invite",
|
||||||
"/join",
|
"/join",
|
||||||
"/kick",
|
"/kick",
|
||||||
|
|
|
@ -334,6 +334,16 @@ $(function() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (text.indexOf("/collapse") === 0) {
|
||||||
|
$(".chan.active .toggle-button.opened").click();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (text.indexOf("/expand") === 0) {
|
||||||
|
$(".chan.active .toggle-button:not(.opened)").click();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
socket.emit("input", {
|
socket.emit("input", {
|
||||||
target: chat.data("id"),
|
target: chat.data("id"),
|
||||||
text: text
|
text: text
|
||||||
|
|
Loading…
Reference in a new issue