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> </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="help-item">
<div class="subject"> <div class="subject">
<kbd>Ctrl</kbd> + <kbd>K</kbd> <kbd>Ctrl</kbd> + <kbd>K</kbd>
@ -479,15 +470,6 @@
</div> </div>
</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="help-item">
<div class="subject"> <div class="subject">
<kbd></kbd> + <kbd>K</kbd> <kbd></kbd> + <kbd>K</kbd>
@ -583,15 +565,6 @@
</div> </div>
</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="help-item">
<div class="subject"> <div class="subject">
<code>/collapse</code> <code>/collapse</code>

View File

@ -2,7 +2,6 @@
const $ = require("jquery"); const $ = require("jquery");
const Mousetrap = require("mousetrap"); const Mousetrap = require("mousetrap");
const utils = require("./utils");
const input = $("#input"); const input = $("#input");
const sidebar = $("#sidebar"); const sidebar = $("#sidebar");
const windows = $("#windows"); const windows = $("#windows");
@ -61,16 +60,6 @@ Mousetrap.bind([
channels.eq(target).click(); 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([ Mousetrap.bind([
"escape" "escape"
], function() { ], function() {

View File

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

View File

@ -1,11 +1,9 @@
"use strict"; "use strict";
const $ = require("jquery"); const $ = require("jquery");
const chat = $("#chat");
const input = $("#input"); const input = $("#input");
module.exports = { module.exports = {
clear,
confirmExit, confirmExit,
forceFocus, forceFocus,
move, move,
@ -26,12 +24,6 @@ function forceFocus() {
input.trigger("click").focus(); 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) { function toggleNickEditor(toggle) {
$("#nick").toggleClass("editable", toggle); $("#nick").toggleClass("editable", toggle);
$("#nick-value").attr("contenteditable", toggle); $("#nick-value").attr("contenteditable", toggle);