Remove unused var, satisfy linter rules, simplify calls
This commit is contained in:
parent
3890aaad6b
commit
3244ec91e8
@ -188,19 +188,10 @@ $(function() {
|
|||||||
const args = text.substr(1).split(" ");
|
const args = text.substr(1).split(" ");
|
||||||
const cmd = args.shift().toLowerCase();
|
const cmd = args.shift().toLowerCase();
|
||||||
if (typeof utils.inputCommands[cmd] === "function") {
|
if (typeof utils.inputCommands[cmd] === "function") {
|
||||||
if (cmd === "join") {
|
if (utils.inputCommands[cmd](args)) {
|
||||||
const channel = args.shift();
|
|
||||||
if (channel !== "") {
|
|
||||||
if (utils.inputCommands[cmd](channel)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (utils.inputCommands[cmd]()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
socket.emit("input", {
|
socket.emit("input", {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
const $ = require("jquery");
|
const $ = require("jquery");
|
||||||
const chat = $("#chat");
|
|
||||||
const input = $("#input");
|
const input = $("#input");
|
||||||
|
|
||||||
var serverHash = -1;
|
var serverHash = -1;
|
||||||
@ -54,14 +53,16 @@ function expand() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function join(channel) {
|
function join(args) {
|
||||||
var chan = findCurrentNetworkChan(channel);
|
const channel = args[0];
|
||||||
|
if (channel) {
|
||||||
|
const chan = findCurrentNetworkChan(channel);
|
||||||
if (chan.length) {
|
if (chan.length) {
|
||||||
chan.click();
|
chan.click();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function toggleNickEditor(toggle) {
|
function toggleNickEditor(toggle) {
|
||||||
$("#nick").toggleClass("editable", toggle);
|
$("#nick").toggleClass("editable", toggle);
|
||||||
|
Loading…
Reference in New Issue
Block a user