Merge pull request #1526 from thelounge/astorije/rm-clear

Get rid of `/clear` command and keybind
This commit is contained in:
Al McKinlay 2017-09-14 07:23:36 +01:00 committed by GitHub
commit f2fb05e7c9
4 changed files with 0 additions and 51 deletions

View File

@ -403,15 +403,6 @@
</div>
</div>
<div class="help-item">
<div class="subject">
<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>L</kbd>
</div>
<div class="description">
<p>Clear the current screen</p>
</div>
</div>
<div class="help-item">
<div class="subject">
<kbd>Ctrl</kbd> + <kbd>K</kbd>
@ -479,15 +470,6 @@
</div>
</div>
<div class="help-item">
<div class="subject">
<kbd></kbd> + <kbd></kbd> + <kbd>L</kbd>
</div>
<div class="description">
<p>Clear the current screen</p>
</div>
</div>
<div class="help-item">
<div class="subject">
<kbd></kbd> + <kbd>K</kbd>
@ -583,15 +565,6 @@
</div>
</div>
<div class="help-item">
<div class="subject">
<code>/clear</code>
</div>
<div class="description">
<p>Clear the current screen.</p>
</div>
</div>
<div class="help-item">
<div class="subject">
<code>/collapse</code>

View File

@ -2,7 +2,6 @@
const $ = require("jquery");
const Mousetrap = require("mousetrap");
const utils = require("./utils");
const input = $("#input");
const sidebar = $("#sidebar");
const windows = $("#windows");
@ -61,16 +60,6 @@ Mousetrap.bind([
channels.eq(target).click();
});
Mousetrap.bind([
"command+shift+l",
"ctrl+shift+l"
], function(e) {
if (e.target === input[0]) {
utils.clear();
e.preventDefault();
}
});
Mousetrap.bind([
"escape"
], function() {

View File

@ -180,11 +180,6 @@ $(function() {
input.val("");
resetInputHeight(input.get(0));
if (text.indexOf("/clear") === 0) {
utils.clear();
return;
}
if (text.indexOf("/collapse") === 0) {
$(".chan.active .toggle-preview.opened").click();
return;

View File

@ -1,11 +1,9 @@
"use strict";
const $ = require("jquery");
const chat = $("#chat");
const input = $("#input");
module.exports = {
clear,
confirmExit,
forceFocus,
move,
@ -26,12 +24,6 @@ function forceFocus() {
input.trigger("click").focus();
}
function clear() {
chat.find(".active")
.find(".show-more").addClass("show").end()
.find(".messages .msg, .date-marker-container").remove();
}
function toggleNickEditor(toggle) {
$("#nick").toggleClass("editable", toggle);
$("#nick-value").attr("contenteditable", toggle);