Add collapse/expand commands to toggle all previews
This commit is contained in:
parent
1b4f4ee11e
commit
e08f18f447
@ -586,6 +586,18 @@
|
||||
</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="subject">
|
||||
<code>/connect host [port]</code>
|
||||
@ -649,6 +661,18 @@
|
||||
</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="subject">
|
||||
<code>/invite nick [channel]</code>
|
||||
|
@ -25,11 +25,13 @@ const commands = [
|
||||
"/ban",
|
||||
"/banlist",
|
||||
"/close",
|
||||
"/collapse",
|
||||
"/connect",
|
||||
"/ctcp",
|
||||
"/deop",
|
||||
"/devoice",
|
||||
"/disconnect",
|
||||
"/expand",
|
||||
"/invite",
|
||||
"/join",
|
||||
"/kick",
|
||||
|
@ -324,6 +324,16 @@ $(function() {
|
||||
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", {
|
||||
target: chat.data("id"),
|
||||
text: text
|
||||
|
Loading…
Reference in New Issue
Block a user